OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 import 'package:scheduled_test/scheduled_test.dart'; | |
6 | |
7 import '../descriptor.dart' as d; | |
8 import '../test_pub.dart'; | |
9 | |
10 main() { | |
11 initConfig(); | |
12 | |
13 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( | |
19 appPath, | |
20 [ | |
21 d.appPubspec(), | |
22 d.dir( | |
23 'web', | |
24 [d.file('main.dart', 'void main() => print("hello");')])]).creat
e(); | |
25 | |
26 schedulePub(args: ["build", "--format", "json"], outputJson: { | |
27 'buildResult': 'success', | |
28 'outputDirectory': 'build', | |
29 'numFiles': 1, | |
30 'log': [{ | |
31 'level': 'Info', | |
32 'transformer': { | |
33 'name': 'Dart2JS', | |
34 'primaryInput': { | |
35 'package': 'myapp', | |
36 'path': 'web/main.dart' | |
37 } | |
38 }, | |
39 'assetId': { | |
40 'package': 'myapp', | |
41 'path': 'web/main.dart' | |
42 }, | |
43 'message': 'Compiling myapp|web/main.dart...' | |
44 }, { | |
45 'level': 'Info', | |
46 'transformer': { | |
47 'name': 'Dart2JS', | |
48 'primaryInput': { | |
49 'package': 'myapp', | |
50 'path': 'web/main.dart' | |
51 } | |
52 }, | |
53 'assetId': { | |
54 'package': 'myapp', | |
55 'path': 'web/main.dart' | |
56 }, | |
57 'message': contains(r'to compile myapp|web/main.dart.') | |
58 }, { | |
59 'level': 'Fine', | |
60 'transformer': { | |
61 'name': 'Dart2JS', | |
62 'primaryInput': { | |
63 'package': 'myapp', | |
64 'path': 'web/main.dart' | |
65 } | |
66 }, | |
67 'assetId': { | |
68 'package': 'myapp', | |
69 'path': 'web/main.dart' | |
70 }, | |
71 'message': contains(r'Took') | |
72 }] | |
73 }); | |
74 }); | |
75 } | |
OLD | NEW |