Index: sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart |
diff --git a/sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart b/sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart |
similarity index 51% |
copy from sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart |
copy to sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart |
index 962e85860a462dcd8d7aee8246d1cda65637304e..a0469f8da49b376865be5e3f61ef740c5d0f3764 100644 |
--- a/sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart |
+++ b/sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart |
@@ -6,37 +6,44 @@ import 'package:scheduled_test/scheduled_test.dart'; |
import '../descriptor.dart' as d; |
import '../test_pub.dart'; |
+import 'utils.dart'; |
main() { |
+ // This is a regression test for http://dartbug.com/16617. |
+ |
initConfig(); |
- integration("ignores existing JS files that were compiled to Dart", () { |
+ integration("compiles dart.js and interop.js next to entrypoints", () { |
nweiz
2014/02/10 21:42:00
Update the test name to match the file name.
Bob Nystrom
2014/02/10 22:08:19
Done.
|
// Dart2js can take a long time to compile dart code, so we increase the |
// timeout to cope with that. |
currentSchedule.timeout *= 3; |
+ serveBrowserPackage(); |
+ |
d.dir(appPath, [ |
- d.appPubspec(), |
+ d.pubspec({ |
+ "name": "myapp", |
+ "dev_dependencies": { |
+ "browser": "any" |
+ } |
+ }), |
d.dir('web', [ |
- d.file('file.dart', 'void main() => print("hello");'), |
- d.file('file.dart.js', 'some js code'), |
- d.dir('subdir', [ |
- d.file('subfile.dart', 'void main() => print("ping");'), |
- d.file('subfile.dart.js', 'some js code') |
- ]) |
+ d.file('file.dart', 'void main() => print("hello");') |
]) |
]).create(); |
- schedulePub(args: ["build"], |
- output: new RegExp(r"Built 6 files!")); |
+ pubGet(); |
+ |
+ schedulePub(args: ["build", "--all"], |
+ output: new RegExp(r"Built 5 files!")); |
d.dir(appPath, [ |
d.dir('build', [ |
d.dir('web', [ |
- d.matcherFile('file.dart.js', isNot(equals('some js code'))), |
- d.dir('subdir', [ |
- d.matcherFile('subfile.dart.js', isNot(equals('some js code'))) |
- ]) |
+ d.dir('packages', [d.dir('browser', [ |
+ d.file('dart.js', 'contents of dart.js'), |
+ d.file('interop.js', 'contents of interop.js') |
+ ])]) |
]) |
]) |
]).validate(); |