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 library barback.test.static_provider_test; |
| 6 |
| 7 import 'package:scheduled_test/scheduled_test.dart'; |
| 8 |
| 9 import 'utils.dart'; |
| 10 |
| 11 main() { |
| 12 initConfig(); |
| 13 test("gets a static source asset", () { |
| 14 initStaticGraph(["app|foo.txt"], staticPackages: ["app"]); |
| 15 expectAsset("app|foo.txt"); |
| 16 buildShouldSucceed(); |
| 17 }); |
| 18 |
| 19 test("doesn't get a nonexistent static source asset", () { |
| 20 initStaticGraph(["app|foo.txt"], staticPackages: ["app"]); |
| 21 expectNoAsset("app|bar.txt"); |
| 22 }); |
| 23 |
| 24 test("a transformer can see a static asset", () { |
| 25 initStaticGraph({ |
| 26 "static|b.inc": "b", |
| 27 "app|a.txt": "static|b.inc" |
| 28 }, staticPackages: ["static"], transformers: { |
| 29 "app": [[new ManyToOneTransformer("txt")]] |
| 30 }); |
| 31 updateSources(["app|a.txt"]); |
| 32 expectAsset("app|a.out", "b"); |
| 33 }); |
| 34 } |
OLD | NEW |