Index: test/html_import_annotation_test.dart |
diff --git a/test/html_import_annotation_test.dart b/test/html_import_annotation_test.dart |
index cae624a37b2dcf2b89fa63925fdb8c02b6ccb1a7..09a3ffd7af6b1b5105c63016248fc620c2152119 100644 |
--- a/test/html_import_annotation_test.dart |
+++ b/test/html_import_annotation_test.dart |
@@ -11,6 +11,7 @@ import 'package:initialize/initialize.dart' as init; |
import 'package:unittest/html_config.dart'; |
import 'package:unittest/unittest.dart'; |
import 'package:web_components/html_import_annotation.dart'; |
+import 'foo/bar.dart'; |
const String importPath = 'my_import.html'; |
@@ -19,8 +20,14 @@ main() { |
test('adds import to head', () { |
return init.run().then((_) { |
- var good = document.head.querySelector('link[href="$importPath"]'); |
- expect(good.import.body.text, 'Hello world!\n'); |
+ var my_import = document.head.querySelector('link[href="$importPath"]'); |
+ expect(my_import, isNotNull); |
+ expect(my_import.import.body.text, 'Hello world!\n'); |
+ |
+ var bar = document.head.querySelector('link[href="foo/bar.html"]'); |
+ expect(bar, isNotNull); |
+ expect(bar.import.body.text, 'bar\n'); |
+ |
var bad = document.head.querySelector('link[href="bad_import.html"]'); |
expect(bad.import, isNull); |
}); |