diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-29 18:45:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 18:45:47 +0100 |
commit | f55b22e195ff0dfaf117aaef2a0fcc51fe0058c8 (patch) | |
tree | c314180b02b1ebf6b3f75ccbb4decade3b4fb511 /cli/js/resources_test.ts | |
parent | 199fb195f334b582e4ee3fccaa9a33aa2a06ca48 (diff) |
add assertResources sanitizer to cli/js/ unit tests (#4161)
Diffstat (limited to 'cli/js/resources_test.ts')
-rw-r--r-- | cli/js/resources_test.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/js/resources_test.ts b/cli/js/resources_test.ts index 5d1e27af7..e3519a2dc 100644 --- a/cli/js/resources_test.ts +++ b/cli/js/resources_test.ts @@ -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( |