| 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..2f08772bc14a1f517f6d0ca1929181a82014182d 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.
|
| + 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();
|
| + });
|
| }
|
|
|