- feat: add
setUp
andtearDown
toblocTest
blocTest(
setUp: () {
// Execute any code prior to building the bloc.
when(() => repository.someMethod()).thenReturn(...);
},
build: () => MyBloc(repository),
act: (bloc) => bloc.add(...),
expect: () => [...],
tearDown: () {
// Execute any code before the test ends.
},
);