OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013, 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 import 'utils.dart'; | |
10 | |
11 main() { | |
12 initConfig(); | |
13 | |
14 integration("compiles dart.js and interop.js next to entrypoints", () { | |
15 // Dart2js can take a long time to compile dart code, so we increase the | |
16 // timeout to cope with that. | |
17 currentSchedule.timeout *= 3; | |
18 | |
19 serveBrowserPackage(); | |
20 | |
21 d.dir(appPath, [d.appPubspec({ | |
22 "browser": "1.0.0" | |
23 }), | |
24 d.dir( | |
25 'foo', | |
26 [ | |
27 d.file('file.dart', 'void main() => print("hello");'), | |
28 d.dir( | |
29 'subdir', | |
30 [d.file('subfile.dart', 'void main() => print("subhello");
')])]), | |
31 d.dir( | |
32 'web', | |
33 [ | |
34 d.file('file.dart', 'void main() => print("hello");'), | |
35 d.dir( | |
36 'subweb', | |
37 [d.file('subfile.dart', 'void main() => print("subhello");
')])])]).create(); | |
38 | |
39 pubGet(); | |
40 | |
41 schedulePub( | |
42 args: ["build", "foo", "web"], | |
43 output: new RegExp(r'Built 12 files to "build".')); | |
44 | |
45 d.dir( | |
46 appPath, | |
47 [ | |
48 d.dir( | |
49 'build', | |
50 [ | |
51 d.dir( | |
52 'foo', | |
53 [ | |
54 d.matcherFile('file.dart.js', isNot(isEmpty)), | |
55 d.dir( | |
56 'packages', | |
57 [ | |
58 d.dir( | |
59 'browser', | |
60 [ | |
61 d.file('dart.js', 'contents of dart.
js'), | |
62 d.file('interop.js', 'contents of in
terop.js')])]), | |
63 d.dir( | |
64 'subdir', | |
65 [ | |
66 d.dir( | |
67 'packages', | |
68 [ | |
69 d.dir( | |
70 'browser', | |
71 [ | |
72 d.file('dart.js', 'contents
of dart.js'), | |
73 d.file('interop.js', 'conten
ts of interop.js')])]), | |
74 d.matcherFile('subfile.dart.js', isNot(isEmp
ty)),])]), | |
75 d.dir( | |
76 'web', | |
77 [ | |
78 d.matcherFile('file.dart.js', isNot(isEmpty)), | |
79 d.dir( | |
80 'packages', | |
81 [ | |
82 d.dir( | |
83 'browser', | |
84 [ | |
85 d.file('dart.js', 'contents of dart.
js'), | |
86 d.file('interop.js', 'contents of in
terop.js')])]), | |
87 d.dir( | |
88 'subweb', | |
89 [ | |
90 d.dir( | |
91 'packages', | |
92 [ | |
93 d.dir( | |
94 'browser', | |
95 [ | |
96 d.file('dart.js', 'contents
of dart.js'), | |
97 d.file('interop.js', 'conten
ts of interop.js')])]), | |
98 d.matcherFile('subfile.dart.js', isNot(isEmp
ty))])])])]).validate(); | |
99 }); | |
100 } | |
OLD | NEW |