Skip to content

Commit 023e027

Browse files
committed
use safeRemoveSync for test cleanup
1 parent 98b7fec commit 023e027

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/smoke/render/render.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import {
1515
noSupportingFiles,
1616
outputCreated,
1717
} from "../../verify.ts";
18+
import { safeRemoveSync } from "../../../src/core/path.ts";
19+
import { safeExistsSync } from "../../../src/core/path.ts";
1820

1921
export function testSimpleIsolatedRender(
2022
file: string,
@@ -82,11 +84,11 @@ export function cleanoutput(
8284
metadata?: Record<string, any>,
8385
) {
8486
const out = outputForInput(input, to, projectOutDir, metadata);
85-
if (existsSync(out.outputPath)) {
86-
Deno.removeSync(out.outputPath);
87+
if (safeExistsSync(out.outputPath)) {
88+
safeRemoveSync(out.outputPath);
8789
}
88-
if (existsSync(out.supportPath)) {
89-
Deno.removeSync(out.supportPath, { recursive: true });
90+
if (safeExistsSync(out.supportPath)) {
91+
safeRemoveSync(out.supportPath, { recursive: true });
9092
}
9193
}
9294

0 commit comments

Comments
 (0)