@@ -15,7 +15,7 @@ import 'issue_list_test.template.dart' as ng;
1515
1616@Component (
1717 selector: 'test' ,
18- directives: const [IssueListComponent ],
18+ directives: [IssueListComponent ],
1919 template: r'<issue-list></issue-list>' ,
2020)
2121class ComplexTestComponent {}
@@ -26,26 +26,26 @@ void main() {
2626
2727 group ('$IssueListComponent ' , () {
2828 test ('should properly render markdown' , () async {
29- var stream = new StreamController <GithubIssue >();
30- var service = new MockGithubService ();
29+ var stream = StreamController <GithubIssue >();
30+ var service = MockGithubService ();
3131 when (service.getIssues ()).thenReturn (stream.stream);
32- var testBed = new NgTestBed <ComplexTestComponent >().addProviders ([
32+ var testBed = NgTestBed <ComplexTestComponent >().addProviders ([
3333 provide (GithubService , useValue: service),
3434 ]);
3535 var fixture = await testBed.create ();
3636
3737 // NOT REQUIRED: We just want to slow down the test to see it.
38- await new Future .delayed (const Duration (seconds: 1 ));
38+ await Future .delayed (const Duration (seconds: 1 ));
3939
4040 // Get a handle to the list.
41- final list = new IssueListPO (fixture.rootElement);
41+ final list = IssueListPO (fixture.rootElement);
4242 expect (await list.isLoading, isTrue);
4343 expect (await list.items, isEmpty);
4444
4545 // Complete the RPC.
4646 await fixture.update ((_) {
4747 stream.add (
48- new GithubIssue (
48+ GithubIssue (
4949 id: 1 ,
5050 url: Uri .parse ('http://github.com' ),
5151 title: 'First issue' ,
@@ -54,7 +54,7 @@ void main() {
5454 ),
5555 );
5656 stream.add (
57- new GithubIssue (
57+ GithubIssue (
5858 id: 2 ,
5959 url: Uri .parse ('http://github.com' ),
6060 title: 'Second issue' ,
@@ -66,7 +66,7 @@ void main() {
6666 });
6767
6868 // NOT REQUIRED: We just want to slow down the test to see it.
69- await new Future .delayed (const Duration (seconds: 1 ));
69+ await Future .delayed (const Duration (seconds: 1 ));
7070
7171 // Try toggling an item.
7272 var row = (await list.items)[0 ];
@@ -81,14 +81,14 @@ void main() {
8181 );
8282
8383 // NOT REQUIRED: We just want to slow down the test to see it.
84- await new Future .delayed (const Duration (seconds: 1 ));
84+ await Future .delayed (const Duration (seconds: 1 ));
8585
8686 // Toggle again.
8787 await row.toggle ();
8888 expect (await row.isToggled, isFalse);
8989
9090 // NOT REQUIRED: We just want to slow down the test to see it.
91- await new Future .delayed (const Duration (seconds: 1 ));
91+ await Future .delayed (const Duration (seconds: 1 ));
9292
9393 row = (await list.items)[1 ];
9494 await row.toggle ();
@@ -111,7 +111,7 @@ class IssueListPO {
111111
112112 Future <List <IssueItemPO >> _items () async => _root
113113 .querySelectorAll ('.github-issue' )
114- .map ((e) => new IssueItemPO (e))
114+ .map ((e) => IssueItemPO (e))
115115 .toList ();
116116
117117 Element get _expansion => _root.querySelector ('.expansion' );
0 commit comments