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 /// This library contains tests for transformer behavior that relates to actions | 5 /// This library contains tests for transformer behavior that relates to actions |
6 /// happening concurrently or other complex asynchronous timing behavior. | 6 /// happening concurrently or other complex asynchronous timing behavior. |
7 library barback.test.package_graph.transform.concurrency_test; | 7 library barback.test.package_graph.transform.concurrency_test; |
8 | 8 |
9 import 'package:barback/src/utils.dart'; | 9 import 'package:barback/src/utils.dart'; |
10 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 ]}); | 483 ]}); |
484 | 484 |
485 rewrite.pauseApply(); | 485 rewrite.pauseApply(); |
486 updateSources(["app|foo.in", "app|bar.txt"]); | 486 updateSources(["app|foo.in", "app|bar.txt"]); |
487 expectAssetDoesNotComplete("app|bar.out"); | 487 expectAssetDoesNotComplete("app|bar.out"); |
488 | 488 |
489 rewrite.resumeApply(); | 489 rewrite.resumeApply(); |
490 expectAsset("app|bar.out", "foo.in"); | 490 expectAsset("app|bar.out", "foo.in"); |
491 buildShouldSucceed(); | 491 buildShouldSucceed(); |
492 }); | 492 }); |
| 493 |
| 494 test("materializes a passed-through asset that was emitted before it was " |
| 495 "available", () { |
| 496 initGraph(["app|foo.in"], {"app": [ |
| 497 [new RewriteTransformer("txt", "txt")] |
| 498 ]}); |
| 499 |
| 500 pauseProvider(); |
| 501 updateSources(["app|foo.in"]); |
| 502 expectAssetDoesNotComplete("app|foo.in"); |
| 503 |
| 504 resumeProvider(); |
| 505 expectAsset("app|foo.in", "foo"); |
| 506 buildShouldSucceed(); |
| 507 }); |
493 } | 508 } |
OLD | NEW |