Skip to content

Commit 36e7a41

Browse files
committed
Use safeDel in after hook
1 parent 0350ac4 commit 36e7a41

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

extensions/ql-vscode/src/vscode-tests/no-workspace/query-results.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ describe('query-results', () => {
179179

180180
afterEach(async () => {
181181
sandbox.restore();
182+
safeDel(interpretedResultsPath);
182183
});
183184

184185
it('should interpretResultsSarif', async function() {
@@ -430,6 +431,14 @@ describe('query-results', () => {
430431
});
431432
});
432433

434+
function safeDel(file: string) {
435+
try {
436+
fs.unlinkSync(file);
437+
} catch (e) {
438+
// ignore
439+
}
440+
}
441+
433442
function createMockQueryWithResults(
434443
queryPath: string,
435444
didRunSuccessfully = true,

0 commit comments

Comments
 (0)