File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
extensions/ql-vscode/test/vscode-tests/minimal-workspace/query-testing Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { Uri } from "vscode";
33import { remove } from "fs-extra" ;
44import { join } from "path" ;
55
6+ import { isIOError } from "../../../../src/common/files" ;
67import { QLTestDiscovery } from "../../../../src/query-testing/qltest-discovery" ;
78import type { DirectoryResult } from "tmp-promise" ;
89import { dir } from "tmp-promise" ;
@@ -49,7 +50,15 @@ describe("qltest-discovery", () => {
4950 } ) ;
5051
5152 afterEach ( async ( ) => {
52- await directory . cleanup ( ) ;
53+ try {
54+ await directory . cleanup ( ) ;
55+ } catch ( e ) {
56+ if ( isIOError ( e ) && e . code === "ENOENT" ) {
57+ // This is fine, the directory was already removed
58+ } else {
59+ throw e ;
60+ }
61+ }
5362 } ) ;
5463
5564 it ( "should run discovery" , async ( ) => {
You can’t perform that action at this time.
0 commit comments