mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
add assertResources sanitizer to cli/js/ unit tests (#4161)
This commit is contained in:
parent
199fb195f3
commit
f55b22e195
11 changed files with 95 additions and 36 deletions
|
@ -31,8 +31,9 @@ testPerm({ net: true }, async function resourcesNet(): Promise<void> {
|
|||
|
||||
testPerm({ read: true }, async function resourcesFile(): Promise<void> {
|
||||
const resourcesBefore = Deno.resources();
|
||||
await Deno.open("cli/tests/hello.txt");
|
||||
const f = await Deno.open("cli/tests/hello.txt");
|
||||
const resourcesAfter = Deno.resources();
|
||||
f.close();
|
||||
|
||||
// check that exactly one new resource (file) was added
|
||||
assertEquals(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue