summaryrefslogtreecommitdiff
path: root/std/io/util_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/io/util_test.ts')
-rw-r--r--std/io/util_test.ts20
1 files changed, 12 insertions, 8 deletions
diff --git a/std/io/util_test.ts b/std/io/util_test.ts
index 575709e39..2fcad9305 100644
--- a/std/io/util_test.ts
+++ b/std/io/util_test.ts
@@ -38,12 +38,16 @@ test("[io/tuil] copyBytes", function(): void {
assertEquals(dst, Uint8Array.of(3, 4, 0, 0));
});
-test("[io/util] tempfile", async function(): Promise<void> {
- const f = await tempFile(".", {
- prefix: "prefix-",
- postfix: "-postfix"
- });
- const base = path.basename(f.filepath);
- assert(!!base.match(/^prefix-.+?-postfix$/));
- await remove(f.filepath);
+test({
+ name: "[io/util] tempfile",
+ fn: async function(): Promise<void> {
+ const f = await tempFile(".", {
+ prefix: "prefix-",
+ postfix: "-postfix"
+ });
+ const base = path.basename(f.filepath);
+ assert(!!base.match(/^prefix-.+?-postfix$/));
+ f.file.close();
+ await remove(f.filepath);
+ }
});