Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ngrouter): fix all static warnings. #55

Merged
merged 2 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ngrouter/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ include: ../analysis_options.yaml
analyzer:
errors:
# False positives related to missing .template.dart files
argument_type_not_assignable: ignore
invalid_assignment: ignore
return_of_invalid_type: ignore
return_of_invalid_type_from_closure: ignore
implementation_imports: ignore
11 changes: 5 additions & 6 deletions ngrouter/test/revert_popstate_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:async' show Completer;
import 'dart:html' show window;

import 'package:test/test.dart';
Expand Down Expand Up @@ -47,26 +46,26 @@ void main() {
// resolved. In order to be sure we're testing the correct state, we listen
// for the next `popstate` event and use a completer to signal that it has
// occured.
var nextPopState = Completer<void>()..complete(window.onPopState.first);
var nextPopState = window.onPopState.first;
// Prevent navigation on back button.
await testFixture.update((_) {
routerHook.canLeave = false;
location.back();
});
// In rare cases, not waiting for this `popstate` event causes the
// subsequent code to execute first.
await nextPopState.future;
await nextPopState;

// Location should not have changed.
expect(location.path(), '/c');

nextPopState = Completer<void>()..complete(window.onPopState.first);
nextPopState = window.onPopState.first;
// Allow navigation on back button.
await testFixture.update((_) {
routerHook.canLeave = true;
location.back();
});
await nextPopState.future;
await nextPopState;

// Location should now be the correct previous history location.
expect(location.path(), '/b');
Expand All @@ -79,7 +78,7 @@ const testModule = Module(
);

@GenerateInjector.fromModules([testModule])
final createInjector = ng.createInjector$Injector;
final InjectorFactory createInjector = ng.createInjector$Injector;

@Component(
selector: 'test',
Expand Down