Chromium Code Reviews| Index: pkg/barback/test/package_graph/lazy_transformer_test.dart |
| diff --git a/pkg/barback/test/package_graph/lazy_transformer_test.dart b/pkg/barback/test/package_graph/lazy_transformer_test.dart |
| index df249b326b0238f54ddbd09d25e4a8eb13564e06..539a12a635f1ccbdd3ca25845d809a8a2b80b35c 100644 |
| --- a/pkg/barback/test/package_graph/lazy_transformer_test.dart |
| +++ b/pkg/barback/test/package_graph/lazy_transformer_test.dart |
| @@ -82,9 +82,6 @@ main() { |
| expect(transformer.numRuns, completion(equals(1))); |
| }); |
| - // TODO(nweiz): enable these once DeclaringTransformers forward laziness |
| - // properly (issue 16442). |
| - // |
| // test("a lazy asset piped into a declaring transformer isn't eagerly " |
| // "compiled", () { |
| // var transformer1 = new LazyRewriteTransformer("blub", "blab"); |
| @@ -229,4 +226,27 @@ main() { |
| expectAllAssets(["app|foo.txt"]); |
| buildShouldSucceed(); |
| }); |
| + |
| + // Regression test |
|
Bob Nystrom
2014/04/08 18:23:44
"."
nweiz
2014/04/08 23:42:33
Done.
|
| + test("a lazy transformer that doesn't apply updates its passed-through asset", |
| + () { |
| + initGraph(["app|foo.txt"], {"app": [ |
| + [new LazyRewriteTransformer("blub", "blab")] |
| + ]}); |
| + |
| + // Pause the provider so that the transformer will start forwarding the |
| + // asset while it's dirty. |
| + pauseProvider(); |
| + updateSources(["app|foo.txt"]); |
| + expectAssetDoesNotComplete("app|foo.txt"); |
| + |
| + resumeProvider(); |
| + expectAsset("app|foo.txt", "foo"); |
| + buildShouldSucceed(); |
| + |
| + modifyAsset("app|foo.txt", "bar"); |
| + updateSources(["app|foo.txt"]); |
| + expectAsset("app|foo.txt", "bar"); |
| + buildShouldSucceed(); |
| + }); |
| } |