diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-04-29 10:08:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-29 10:08:27 -0400 |
| commit | da52058a945999d486b07700d2834f027a65947c (patch) | |
| tree | b6031c274cbc36dcefc6d681473e366cdb208c89 /tests/specs/bench/allow_none | |
| parent | b02ffec37c73be8a73b95b33b32efa693e84e01b (diff) | |
chore: migrate bench, publish, and more itests to spec tests (#23584)
Diffstat (limited to 'tests/specs/bench/allow_none')
| -rw-r--r-- | tests/specs/bench/allow_none/__test__.jsonc | 5 | ||||
| -rw-r--r-- | tests/specs/bench/allow_none/allow_none.out | 22 | ||||
| -rw-r--r-- | tests/specs/bench/allow_none/allow_none.ts | 21 |
3 files changed, 48 insertions, 0 deletions
diff --git a/tests/specs/bench/allow_none/__test__.jsonc b/tests/specs/bench/allow_none/__test__.jsonc new file mode 100644 index 000000000..9ae51f75b --- /dev/null +++ b/tests/specs/bench/allow_none/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "bench allow_none.ts", + "output": "allow_none.out", + "exitCode": 1 +} diff --git a/tests/specs/bench/allow_none/allow_none.out b/tests/specs/bench/allow_none/allow_none.out new file mode 100644 index 000000000..cfe86adcb --- /dev/null +++ b/tests/specs/bench/allow_none/allow_none.out @@ -0,0 +1,22 @@ +Check [WILDLINE]/allow_none.ts +cpu: [WILDLINE] +runtime: deno [WILDLINE] ([WILDLINE]) + +[WILDLINE]/allow_none.ts +benchmark time (avg) iter/s (min … max) p75 p99 p995 +--------------------------------------------------------------- ----------------------------- +read error: PermissionDenied: Can't escalate parent thread permissions +[WILDCARD] +write error: PermissionDenied: Can't escalate parent thread permissions +[WILDCARD] +net error: PermissionDenied: Can't escalate parent thread permissions +[WILDCARD] +env error: PermissionDenied: Can't escalate parent thread permissions +[WILDCARD] +run error: PermissionDenied: Can't escalate parent thread permissions +[WILDCARD] +ffi error: PermissionDenied: Can't escalate parent thread permissions +[WILDCARD] +hrtime error: PermissionDenied: Can't escalate parent thread permissions +[WILDCARD] +error: Bench failed diff --git a/tests/specs/bench/allow_none/allow_none.ts b/tests/specs/bench/allow_none/allow_none.ts new file mode 100644 index 000000000..77f86f256 --- /dev/null +++ b/tests/specs/bench/allow_none/allow_none.ts @@ -0,0 +1,21 @@ +const permissions: Deno.PermissionName[] = [ + "read", + "write", + "net", + "env", + "run", + "ffi", + "hrtime", +]; + +for (const name of permissions) { + Deno.bench({ + name, + permissions: { + [name]: true, + }, + fn() { + throw new Error("unreachable"); + }, + }); +} |
