Skip to content

Commit

Permalink
Fix qltest-discovery test after tmp upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
koesie10 committed Jan 13, 2025
1 parent 9f0a5f0 commit 5756289
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Uri } from "vscode";
import { remove } from "fs-extra";
import { join } from "path";

import { isIOError } from "../../../../src/common/files";
import { QLTestDiscovery } from "../../../../src/query-testing/qltest-discovery";
import type { DirectoryResult } from "tmp-promise";
import { dir } from "tmp-promise";
Expand Down Expand Up @@ -49,7 +50,15 @@ describe("qltest-discovery", () => {
});

afterEach(async () => {
await directory.cleanup();
try {
await directory.cleanup();
} catch (e) {
if (isIOError(e) && e.code === "ENOENT") {
// This is fine, the directory was already removed
} else {
throw e;
}
}
});

it("should run discovery", async () => {
Expand Down

0 comments on commit 5756289

Please sign in to comment.