mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
fix(cli/js): broken truncate permission tests (#6249)
The tests for testing that `Deno.truncateSync` and `Deno.truncate` require write permissions seem to not call the functions they are testing *at all* and are calling `Deno.mkdir` and `Deno.mkdirSync` instead. This commit replaces those calls with calls to `Deno.truncateSync` and `Deno.truncate` respectively.
This commit is contained in:
parent
e7054d50f0
commit
9285221452
1 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ unitTest(
|
|||
unitTest({ perms: { write: false } }, function truncateSyncPerm(): void {
|
||||
let err;
|
||||
try {
|
||||
Deno.mkdirSync("/test_truncateSyncPermission.txt");
|
||||
Deno.truncateSync("/test_truncateSyncPermission.txt");
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ unitTest({ perms: { write: false } }, async function truncatePerm(): Promise<
|
|||
> {
|
||||
let err;
|
||||
try {
|
||||
await Deno.mkdir("/test_truncatePermission.txt");
|
||||
await Deno.truncate("/test_truncatePermission.txt");
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue