Skip to content

Commit be1fd88

Browse files
authored
test(binding-file): use asynchronous unlink for file deletion (#1185)
1 parent 7334567 commit be1fd88

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/binding-file/test/file-client-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Content, ContentSerdes } from "@node-wot/core";
1818
import FileClient from "../src/file-client";
1919
import { Form } from "@node-wot/td-tools";
2020
import { expect } from "chai";
21-
import { unlink } from "fs";
21+
import { promises as asyncFs } from "fs";
2222
import { fileURLToPath } from "node:url";
2323

2424
const jsonValue = {
@@ -89,7 +89,7 @@ describe("File Client Implementation", () => {
8989
const readValue = ContentSerdes.get().contentToValue(readContent, {});
9090
expect(readValue).to.deep.eq(originalValue);
9191

92-
unlink(filePath, () => {});
92+
await asyncFs.unlink(filePath);
9393
});
9494
}
9595
}

0 commit comments

Comments
 (0)