Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 66086ff

Browse files
feat: trigger mock navigator pop call when pop occurs (#5)
1 parent b387f9f commit 66086ff

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/mock_navigator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class _MockNavigatorState extends NavigatorState {
6464
Future<T?> push<T extends Object?>(Route<T> route) => navigator.push(route);
6565

6666
@override
67-
void pop<T extends Object?>([T? result]) {}
67+
void pop<T extends Object?>([T? result]) => navigator.pop(result);
6868

6969
@override
7070
Widget build(BuildContext context) => child!;

test/mock_navigator_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,7 @@ void main() {
6767

6868
expect(pushCalled, equals(1));
6969
});
70+
71+
// TODO: Add 'mocks .pop calls' test
7072
});
7173
}

0 commit comments

Comments
 (0)