| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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 // Dart2js can take a long time to compile dart code, so we increase the timeout | 5 // Dart2js can take a long time to compile dart code, so we increase the timeout |
| 6 // to cope with that. | 6 // to cope with that. |
| 7 @Timeout.factor(3) | 7 @Timeout.factor(3) |
| 8 | 8 |
| 9 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 d.dir(appPath, [ | 31 d.dir(appPath, [ |
| 32 d.dir('build', [ | 32 d.dir('build', [ |
| 33 d.dir('web', [ | 33 d.dir('web', [ |
| 34 d.matcherFile('file.dart.js', contains('fblthp')), | 34 d.matcherFile('file.dart.js', contains('fblthp')), |
| 35 ]) | 35 ]) |
| 36 ]) | 36 ]) |
| 37 ]).validate(); | 37 ]).validate(); |
| 38 }); | 38 }); |
| 39 | 39 |
| 40 integration('from "pub serve"', () { | 40 integration('from "pub serve"', () { |
| 41 pubServe(args: ["--define", "name=fblthp"]); | 41 pubServe(args: ["--define", "name=fblthp"], shouldGetFirst: true); |
| 42 requestShouldSucceed("file.dart.js", contains("fblthp")); | 42 requestShouldSucceed("file.dart.js", contains("fblthp")); |
| 43 endPubServe(); | 43 endPubServe(); |
| 44 }); | 44 }); |
| 45 | 45 |
| 46 integration('which takes precedence over the pubspec', () { | 46 integration('which takes precedence over the pubspec', () { |
| 47 d.dir(appPath, [ | 47 d.dir(appPath, [ |
| 48 d.pubspec({ | 48 d.pubspec({ |
| 49 "name": "myapp", | 49 "name": "myapp", |
| 50 "transformers": [ | 50 "transformers": [ |
| 51 {"\$dart2js": {"environment": {"name": "slartibartfast"}}} | 51 {"\$dart2js": {"environment": {"name": "slartibartfast"}}} |
| 52 ] | 52 ] |
| 53 }) | 53 }) |
| 54 ]).create(); | 54 ]).create(); |
| 55 | 55 |
| 56 pubServe(args: ["--define", "name=fblthp"]); | 56 pubServe(args: ["--define", "name=fblthp"], shouldGetFirst: true); |
| 57 requestShouldSucceed("file.dart.js", allOf([ | 57 requestShouldSucceed("file.dart.js", allOf([ |
| 58 contains("fblthp"), | 58 contains("fblthp"), |
| 59 isNot(contains("slartibartfast")) | 59 isNot(contains("slartibartfast")) |
| 60 ])); | 60 ])); |
| 61 endPubServe(); | 61 endPubServe(); |
| 62 }); | 62 }); |
| 63 }); | 63 }); |
| 64 } | 64 } |
| OLD | NEW |