mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
refactor(tests): replace MockLogger with MockObserver in scope tests to align with updated observer API
This commit is contained in:
@@ -120,8 +120,8 @@ void main() {
|
||||
expect(Scope(scope, observer: observer), isNotNull); // эквивалент
|
||||
});
|
||||
test('closeSubScope removes subscope so next openSubScope returns new', () async {
|
||||
final logger = MockLogger();
|
||||
final scope = Scope(null, logger: logger);
|
||||
final observer = MockObserver();
|
||||
final scope = Scope(null, observer: observer);
|
||||
final subScope = scope.openSubScope("child");
|
||||
expect(scope.openSubScope("child"), same(subScope));
|
||||
await scope.closeSubScope("child");
|
||||
@@ -295,7 +295,7 @@ void main() {
|
||||
expect(t.disposed, isTrue);
|
||||
});
|
||||
test('scope.disposeAsync calls dispose on all unique disposables', () async {
|
||||
final scope = Scope(null, logger: MockLogger());
|
||||
final scope = Scope(null, observer: MockObserver());
|
||||
scope.installModules([ModuleWithDisposable()]);
|
||||
final t1 = scope.resolve<TestDisposable>();
|
||||
final t2 = scope.resolve<AnotherDisposable>();
|
||||
|
||||
Reference in New Issue
Block a user