OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 import 'dart:json' as json; | 5 import 'dart:convert'; |
6 | 6 |
7 import 'package:path/path.dart' as path; | 7 import 'package:path/path.dart' as path; |
8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
9 | 9 |
10 import '../descriptor.dart' as d; | 10 import '../descriptor.dart' as d; |
11 import '../test_pub.dart'; | 11 import '../test_pub.dart'; |
12 | 12 |
13 main() { | 13 main() { |
14 initConfig(); | 14 initConfig(); |
15 | 15 |
16 integration("compiles dart.js and interop.js next to entrypoints", () { | 16 integration("compiles dart.js and interop.js next to entrypoints", () { |
17 // Dart2js can take a long time to compile dart code, so we increase the | 17 // Dart2js can take a long time to compile dart code, so we increase the |
18 // timeout to cope with that. | 18 // timeout to cope with that. |
19 currentSchedule.timeout *= 3; | 19 currentSchedule.timeout *= 3; |
20 | 20 |
21 serve([ | 21 serve([ |
22 d.dir('api', [ | 22 d.dir('api', [ |
23 d.dir('packages', [ | 23 d.dir('packages', [ |
24 d.file('browser', json.stringify({ | 24 d.file('browser', JSON.encode({ |
25 'versions': [packageVersionApiMap(packageMap('browser', '1.0.0'))] | 25 'versions': [packageVersionApiMap(packageMap('browser', '1.0.0'))] |
26 })), | 26 })), |
27 d.dir('browser', [ | 27 d.dir('browser', [ |
28 d.dir('versions', [ | 28 d.dir('versions', [ |
29 d.file('1.0.0', json.stringify( | 29 d.file('1.0.0', JSON.encode( |
30 packageVersionApiMap( | 30 packageVersionApiMap( |
31 packageMap('browser', '1.0.0'), | 31 packageMap('browser', '1.0.0'), |
32 full: true))) | 32 full: true))) |
33 ]) | 33 ]) |
34 ]) | 34 ]) |
35 ]) | 35 ]) |
36 ]), | 36 ]), |
37 d.dir('packages', [ | 37 d.dir('packages', [ |
38 d.dir('browser', [ | 38 d.dir('browser', [ |
39 d.dir('versions', [ | 39 d.dir('versions', [ |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 d.file('dart.js', 'contents of dart.js'), | 89 d.file('dart.js', 'contents of dart.js'), |
90 d.file('interop.js', 'contents of interop.js') | 90 d.file('interop.js', 'contents of interop.js') |
91 ])]), | 91 ])]), |
92 d.matcherFile('subfile.dart.js', isNot(isEmpty)), | 92 d.matcherFile('subfile.dart.js', isNot(isEmpty)), |
93 d.matcherFile('subfile.dart', isNot(isEmpty)) | 93 d.matcherFile('subfile.dart', isNot(isEmpty)) |
94 ]) | 94 ]) |
95 ]) | 95 ]) |
96 ]).validate(); | 96 ]).validate(); |
97 }); | 97 }); |
98 } | 98 } |
OLD | NEW |