Skip to content

Commit 7ac5a8f

Browse files
committed
Fix windows broken test
1 parent dc09925 commit 7ac5a8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extensions/ql-vscode/src/vscode-tests/minimal-workspace/determining-selected-query-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ export function run() {
1616
describe('Determining selected query', async () => {
1717
it('should allow ql files to be queried', async () => {
1818
const q = await determineSelectedQuery(Uri.parse('file:///tmp/queryname.ql'), false);
19-
expect(q.queryPath).to.equal('/tmp/queryname.ql');
19+
expect(q.queryPath).to.equal(path.join('/', 'tmp', 'queryname.ql'));
2020
expect(q.quickEvalPosition).to.equal(undefined);
2121
});
2222

2323
it('should allow ql files to be quick-evaled', async () => {
2424
const doc = await showQlDocument('query.ql');
2525
const q = await determineSelectedQuery(doc.uri, true);
26-
expect(q.queryPath).to.match(new RegExp('ql-vscode/test/data/query\.ql$'));
26+
expect(q.queryPath).to.satisfy((p: string) => p.endsWith(path.join('ql-vscode', 'test', 'data', 'query.ql')));
2727
});
2828

2929
it('should allow qll files to be quick-evaled', async () => {
3030
const doc = await showQlDocument('library.qll');
3131
const q = await determineSelectedQuery(doc.uri, true);
32-
expect(q.queryPath).to.match(new RegExp('ql-vscode/test/data/library\.qll$'));
32+
expect(q.queryPath).to.satisfy((p: string) => p.endsWith(path.join('ql-vscode', 'test', 'data', 'library.qll')));
3333
});
3434

3535
it('should reject non-ql files when running a query', async () => {

0 commit comments

Comments
 (0)