OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
| 5 // Dart2js can take a long time to compile dart code, so we increase the timeout |
| 6 // to cope with that. |
| 7 @Timeout.factor(3) |
| 8 |
5 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
6 | 10 |
7 import '../descriptor.dart' as d; | 11 import '../descriptor.dart' as d; |
8 import '../test_pub.dart'; | 12 import '../test_pub.dart'; |
9 | 13 |
10 main() { | 14 main() { |
11 initConfig(); | |
12 | |
13 integration("outputs results to JSON in a successful build", () { | 15 integration("outputs results to JSON in a successful build", () { |
14 // Dart2js can take a long time to compile dart code, so we increase the | |
15 // timeout to cope with that. | |
16 currentSchedule.timeout *= 3; | |
17 | |
18 d.dir(appPath, [ | 16 d.dir(appPath, [ |
19 d.appPubspec(), | 17 d.appPubspec(), |
20 d.dir('web', [ | 18 d.dir('web', [ |
21 d.file('main.dart', 'void main() => print("hello");') | 19 d.file('main.dart', 'void main() => print("hello");') |
22 ]) | 20 ]) |
23 ]).create(); | 21 ]).create(); |
24 | 22 |
25 schedulePub(args: ["build", "--format", "json"], | 23 schedulePub(args: ["build", "--format", "json"], |
26 outputJson: { | 24 outputJson: { |
27 'buildResult': 'success', | 25 'buildResult': 'success', |
(...skipping 24 matching lines...) Expand all Loading... |
52 'name': 'Dart2JS', | 50 'name': 'Dart2JS', |
53 'primaryInput': {'package': 'myapp', 'path': 'web/main.dart'} | 51 'primaryInput': {'package': 'myapp', 'path': 'web/main.dart'} |
54 }, | 52 }, |
55 'assetId': {'package': 'myapp', 'path': 'web/main.dart'}, | 53 'assetId': {'package': 'myapp', 'path': 'web/main.dart'}, |
56 'message': contains(r'Took') | 54 'message': contains(r'Took') |
57 } | 55 } |
58 ] | 56 ] |
59 }); | 57 }); |
60 }); | 58 }); |
61 } | 59 } |
OLD | NEW |