OLD | NEW |
| (Empty) |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.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 '../serve/utils.dart'; | |
10 | |
11 main() { | |
12 // This is a regression test for issue #17198. | |
13 initConfig(); | |
14 withBarbackVersions("any", () { | |
15 integration( | |
16 "compiles a Dart file that imports a generated file to JS " "outside web
/", | |
17 () { | |
18 d.dir(appPath, [d.pubspec({ | |
19 "name": "myapp", | |
20 "version": "0.0.1", | |
21 "transformers": ["myapp/transformer"] | |
22 }), | |
23 d.dir("lib", [d.file("transformer.dart", dartTransformer("munge"))])
, | |
24 d.dir("test", [d.file("main.dart", """ | |
25 import "other.dart"; | |
26 void main() => print(TOKEN); | |
27 """), d.file("other.dart", """ | |
28 library other; | |
29 const TOKEN = "before"; | |
30 """)])]).create(); | |
31 | |
32 createLockFile('myapp', pkg: ['barback']); | |
33 | |
34 pubServe(args: ["test"]); | |
35 requestShouldSucceed( | |
36 "main.dart.js", | |
37 contains("(before, munge)"), | |
38 root: "test"); | |
39 endPubServe(); | |
40 }); | |
41 }); | |
42 } | |
OLD | NEW |