Skip to content

Commit 5f2bc5a

Browse files
authored
Change target (URI) to not contain '\' character
1 parent a562b11 commit 5f2bc5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/scss/scssNavigation-node-modules.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { assert } from 'chai';
22
import { getSCSSLanguageService } from '../../cssLanguageService';
33
import { TextDocument } from 'vscode-languageserver-textdocument';
44
import { FileType, getNodeFSRequestService } from '../../nodeFs';
5+
import { URI } from 'vscode-uri';
56

67
const ls = getSCSSLanguageService();
78
const mockFS = getNodeFSRequestService();
@@ -11,7 +12,7 @@ describe('SCSS link navigation – node_modules', () => {
1112
const doc = TextDocument.create('file:///c:/proj/app.scss', 'scss', 1,
1213
"@import 'bootstrap/scss/variables';");
1314
const links = await ls.findDocumentLinks2(doc, ls.parseStylesheet(doc), {}, mockFS);
14-
const target = links[0].target!.replace(/\\/g, '/');
15-
assert.match(target, /node_modules\/bootstrap\/scss\/_variables\.scss$/);
15+
const expected = URI.file('c:/proj/node_modules/bootstrap/scss/_variables.scss').toString();
16+
assert.strictEqual(links[0].target, expected);
1617
});
1718
});

0 commit comments

Comments
 (0)