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 integration("compiles Dart entrypoints in root package to JS", () { |
| 13 // Dart2js can take a long time to compile dart code, so we increase the |
| 14 // timeout to cope with that. |
| 15 currentSchedule.timeout *= 3; |
| 16 |
| 17 d.dir( |
| 18 appPath, |
| 19 [ |
| 20 d.appPubspec(), |
| 21 d.dir( |
| 22 'benchmark', |
| 23 [ |
| 24 d.file('file.dart', 'void main() => print("hello");'), |
| 25 d.file('lib.dart', 'void foo() => print("hello");'), |
| 26 d.dir('subdir', [d.file('subfile.dart', 'void main() => prin
t("ping");')])]), |
| 27 d.dir( |
| 28 'foo', |
| 29 [ |
| 30 d.file('file.dart', 'void main() => print("hello");'), |
| 31 d.file('lib.dart', 'void foo() => print("hello");'), |
| 32 d.dir('subdir', [d.file('subfile.dart', 'void main() => prin
t("ping");')])]), |
| 33 d.dir( |
| 34 'web', |
| 35 [ |
| 36 d.file('file.dart', 'void main() => print("hello");'), |
| 37 d.file('lib.dart', 'void foo() => print("hello");'), |
| 38 d.dir( |
| 39 'subdir', |
| 40 [d.file('subfile.dart', 'void main() => print("ping");')
])])]).create(); |
| 41 |
| 42 schedulePub( |
| 43 args: ["build", "benchmark", "foo", "web"], |
| 44 output: new RegExp(r'Built 6 files to "build".')); |
| 45 |
| 46 d.dir( |
| 47 appPath, |
| 48 [ |
| 49 d.dir( |
| 50 'build', |
| 51 [ |
| 52 d.dir( |
| 53 'benchmark', |
| 54 [ |
| 55 d.matcherFile('file.dart.js', isNot(isEmpty)), |
| 56 d.nothing('file.dart'), |
| 57 d.nothing('lib.dart'), |
| 58 d.dir( |
| 59 'subdir', |
| 60 [ |
| 61 d.matcherFile('subfile.dart.js', isNot(isEmp
ty)), |
| 62 d.nothing('subfile.dart')])]), |
| 63 d.dir( |
| 64 'foo', |
| 65 [ |
| 66 d.matcherFile('file.dart.js', isNot(isEmpty)), |
| 67 d.nothing('file.dart'), |
| 68 d.nothing('lib.dart'), |
| 69 d.dir( |
| 70 'subdir', |
| 71 [ |
| 72 d.matcherFile('subfile.dart.js', isNot(isEmp
ty)), |
| 73 d.nothing('subfile.dart')])]), |
| 74 d.dir( |
| 75 'web', |
| 76 [ |
| 77 d.matcherFile('file.dart.js', isNot(isEmpty)), |
| 78 d.nothing('file.dart'), |
| 79 d.nothing('lib.dart'), |
| 80 d.dir( |
| 81 'subdir', |
| 82 [ |
| 83 d.matcherFile('subfile.dart.js', isNot(isEmp
ty)), |
| 84 d.nothing('subfile.dart')])])])]).validate()
; |
| 85 }); |
| 86 } |
OLD | NEW |