Environment ‐ Deno - uhop/tape-six GitHub Wiki
Individual tests
tape-six tests are directly executable with Deno.
Example:
deno run -A tests/manual/test-three-tests.js
In the example above -A is used to allow all permissions. If you fine-tune permissions, don't forget to specify --allow-read so tests can be read and --allow-env so the harness can read its settings. That are all permissions required to run tape-six. If your code does something extra, like writing files, using the network, and so on, don't forget to specify those permissions as well.
Read about Deno permissions below.
Running utilities
Running tape6 (use one of):
tape6-deno
deno run -A `npx tape6 --self`
deno run -A `npx tape6-runner deno`
Warning: -A allows everything. You may want to use a proper set of permissions.
Warning: tape6-deno runs with -A permissions. If you want to specify detailed permissions, use deno run ... variant instead.
Running tape6-server:
deno run --allow-read --allow-env --allow-net `npx tape6-server --self` --trace
deno run --allow-read --allow-env --allow-net `npx tape6-runner server` --trace
Permissions
If you are unclear about what permissions are required for your code please consult the documentation: Deno's permissions.
Some of them:
--allow-read— so Deno can read and load files from a file system, including JavaScript files.--allow-write— so Deno can write files to a file system.--allow-net— so Deno can access the network.--allow-env— so Deno can access environment variables.--allow-hrtime— so tests can use the high-resolution timer. This permission is optional. No need to specify it if you don't care about the exact time spent on individual tests.- This permission is obsolete in Deno 2 — high-resolution timer is always allowed.
--allow-run— so Deno can spawn child processes for running tests.--allow-allAKA-A— so Deno can do everything without restrictions.