summaryrefslogtreecommitdiff
path: root/tests/specs/bench/json_output
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-29 10:08:27 -0400
committerGitHub <noreply@github.com>2024-04-29 10:08:27 -0400
commitda52058a945999d486b07700d2834f027a65947c (patch)
treeb6031c274cbc36dcefc6d681473e366cdb208c89 /tests/specs/bench/json_output
parentb02ffec37c73be8a73b95b33b32efa693e84e01b (diff)
chore: migrate bench, publish, and more itests to spec tests (#23584)
Diffstat (limited to 'tests/specs/bench/json_output')
-rw-r--r--tests/specs/bench/json_output/__test__.jsonc5
-rw-r--r--tests/specs/bench/json_output/pass.json.out28
-rw-r--r--tests/specs/bench/json_output/pass.ts10
3 files changed, 43 insertions, 0 deletions
diff --git a/tests/specs/bench/json_output/__test__.jsonc b/tests/specs/bench/json_output/__test__.jsonc
new file mode 100644
index 000000000..fa0dadcd0
--- /dev/null
+++ b/tests/specs/bench/json_output/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "bench --json pass.ts",
+ "output": "pass.json.out",
+ "exitCode": 0
+}
diff --git a/tests/specs/bench/json_output/pass.json.out b/tests/specs/bench/json_output/pass.json.out
new file mode 100644
index 000000000..53259e758
--- /dev/null
+++ b/tests/specs/bench/json_output/pass.json.out
@@ -0,0 +1,28 @@
+Check file:///[WILDCARD]/pass.ts
+{
+ "runtime": "Deno/[WILDCARD]",
+ "cpu": "[WILDCARD]",
+ "benches": [
+ {
+ "origin": "file:///[WILDCARD]/pass.ts",
+ "group": null,
+ "name": "bench0",
+ "baseline": false,
+ "results": [
+ {
+ "ok": {
+ "n": [WILDCARD],
+ "min": [WILDCARD],
+ "max": [WILDCARD],
+ "avg": [WILDCARD],
+ "p75": [WILDCARD],
+ "p99": [WILDCARD],
+ "p995": [WILDCARD],
+ "p999": [WILDCARD]
+ }
+ }
+ ]
+ },
+[WILDCARD]
+ ]
+}
diff --git a/tests/specs/bench/json_output/pass.ts b/tests/specs/bench/json_output/pass.ts
new file mode 100644
index 000000000..48348d447
--- /dev/null
+++ b/tests/specs/bench/json_output/pass.ts
@@ -0,0 +1,10 @@
+Deno.bench("bench0", () => {});
+Deno.bench("bench1", () => {});
+Deno.bench("bench2", () => {});
+Deno.bench("bench3", () => {});
+Deno.bench("bench4", () => {});
+Deno.bench("bench5", () => {});
+Deno.bench("bench6", () => {});
+Deno.bench("bench7", () => {});
+Deno.bench("bench8", () => {});
+Deno.bench("bench9", () => {});