| Index: pkg/barback/test/package_graph/get_all_assets_test.dart
|
| diff --git a/pkg/barback/test/package_graph/get_all_assets_test.dart b/pkg/barback/test/package_graph/get_all_assets_test.dart
|
| index 7cadbdfb17b61b6d67340de4278bd4a0a240863b..08da238cc34b414c4c5e24d4c4b64008870d5e63 100644
|
| --- a/pkg/barback/test/package_graph/get_all_assets_test.dart
|
| +++ b/pkg/barback/test/package_graph/get_all_assets_test.dart
|
| @@ -4,6 +4,9 @@
|
|
|
| library barback.test.barback_test;
|
|
|
| +import 'dart:async';
|
| +
|
| +import 'package:barback/barback.dart';
|
| import 'package:scheduled_test/scheduled_test.dart';
|
|
|
| import '../utils.dart';
|
| @@ -74,4 +77,24 @@ main() {
|
| isTransformerException(equals(BadTransformer.ERROR))
|
| ]));
|
| });
|
| +
|
| + // Regression test.
|
| + test("getAllAssets() is called synchronously after after initializing "
|
| + "barback", () {
|
| + var provider = new MockProvider({
|
| + "app|a.txt": "a",
|
| + "app|b.txt": "b",
|
| + "app|c.txt": "c"
|
| + });
|
| + var barback = new Barback(provider);
|
| + barback.updateSources([
|
| + new AssetId.parse("app|a.txt"),
|
| + new AssetId.parse("app|b.txt"),
|
| + new AssetId.parse("app|c.txt")
|
| + ]);
|
| +
|
| + expect(barback.getAllAssets().then((assets) {
|
| + return Future.wait(assets.map((asset) => asset.readAsString()));
|
| + }), completion(unorderedEquals(["a", "b", "c"])));
|
| + });
|
| }
|
|
|