| Index: sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
|
| similarity index 62%
|
| copy from sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart
|
| copy to sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
|
| index 9bd4ff41a7d552df57b5a75013d94000d01bd7f8..e407ee41bf2e284fe7ce8a7e16fb0030d4cd1805 100644
|
| --- a/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
|
| @@ -4,16 +4,16 @@
|
|
|
| import 'dart:convert';
|
|
|
| -import 'package:path/path.dart' as path;
|
| import 'package:scheduled_test/scheduled_test.dart';
|
|
|
| -import '../descriptor.dart' as d;
|
| -import '../test_pub.dart';
|
| +import '../../descriptor.dart' as d;
|
| +import '../../test_pub.dart';
|
|
|
| main() {
|
| initConfig();
|
|
|
| - integration("compiles dart.js and interop.js next to entrypoints", () {
|
| + integration("compiles dart.js and interop.js next to entrypoints when "
|
| + "dartjs is explicitly configured", () {
|
| // Dart2js can take a long time to compile dart code, so we increase the
|
| // timeout to cope with that.
|
| currentSchedule.timeout *= 3;
|
| @@ -50,38 +50,40 @@ main() {
|
| ]);
|
|
|
| d.dir(appPath, [
|
| - d.appPubspec({"browser": "1.0.0"}),
|
| + d.pubspec({
|
| + "name": "myapp",
|
| + "dependencies": {
|
| + "browser": "1.0.0"
|
| + },
|
| + "transformers": [{
|
| + "\$dart2js": {
|
| + "minify": true
|
| + }
|
| + }]
|
| + }),
|
| d.dir('web', [
|
| d.file('file.dart', 'void main() => print("hello");'),
|
| - d.dir('subdir', [
|
| - d.file('subfile.dart', 'void main() => print("subhello");')
|
| - ])
|
| ])
|
| ]).create();
|
|
|
| pubGet();
|
|
|
| schedulePub(args: ["build"],
|
| - output: new RegExp(r"Built 12 files!"),
|
| + output: new RegExp(r"Built 5 files!"),
|
| exitCode: 0);
|
|
|
| d.dir(appPath, [
|
| d.dir('build', [
|
| - d.matcherFile('file.dart.js', isNot(isEmpty)),
|
| - d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)),
|
| - d.matcherFile('file.dart.js.map', isNot(isEmpty)),
|
| - d.dir('packages', [d.dir('browser', [
|
| - d.file('dart.js', 'contents of dart.js'),
|
| - d.file('interop.js', 'contents of interop.js')
|
| - ])]),
|
| - d.dir('subdir', [
|
| - d.dir('packages', [d.dir('browser', [
|
| - d.file('dart.js', 'contents of dart.js'),
|
| - d.file('interop.js', 'contents of interop.js')
|
| - ])]),
|
| - d.matcherFile('subfile.dart.js', isNot(isEmpty)),
|
| - d.matcherFile('subfile.dart.precompiled.js', isNot(isEmpty)),
|
| - d.matcherFile('subfile.dart.js.map', isNot(isEmpty))
|
| + d.dir('web', [
|
| + d.matcherFile('file.dart.js', isMinifiedDart2JSOutput),
|
| + d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)),
|
| + d.matcherFile('file.dart.js.map', isNot(isEmpty)),
|
| + d.dir('packages', [
|
| + d.dir('browser', [
|
| + d.file('dart.js', 'contents of dart.js'),
|
| + d.file('interop.js', 'contents of interop.js')
|
| + ])
|
| + ]),
|
| ])
|
| ])
|
| ]).validate();
|
|
|