[css] resolve modules without require

This commit is contained in:
Martin Aeschlimann
2019-06-05 13:04:45 +02:00
parent 3460fb97b0
commit 8f72934706
2 changed files with 22 additions and 14 deletions

View File

@@ -54,7 +54,7 @@ suite('Links', () => {
}
function getTestResource(path: string) {
return Uri.file(resolve(__dirname, '../../test/linkTestFixtures', path)).toString();
return Uri.file(resolve(__dirname, '../../test/linksTestFixtures', path)).toString();
}
test('url links', function () {
@@ -66,4 +66,14 @@ suite('Links', () => {
[{ offset: 29, value: '"hello.html"', target: getTestResource('hello.html') }], testUri, folders
);
});
test('url links', function () {
let testUri = getTestResource('about.css');
let folders = [{ name: 'x', uri: getTestResource('') }];
assertLinks('html { background-image: url("~foo/hello.html|")',
[{ offset: 29, value: '"~foo/hello.html"', target: getTestResource('node_modules/foo/hello.html') }], testUri, folders
);
});
});