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/lockfile | |
| parent | b02ffec37c73be8a73b95b33b32efa693e84e01b (diff) | |
chore: migrate bench, publish, and more itests to spec tests (#23584)
Diffstat (limited to 'tests/specs/lockfile')
| -rw-r--r-- | tests/specs/lockfile/no_lock/__test__.jsonc | 31 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/bench.nolock.out | 5 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/deno.json | 5 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/deno.lock | 6 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/doc.nolock.out | 0 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/fail.out | 3 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/fail_initial.out | 4 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/info.nolock.out | 7 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/main.bench.ts | 8 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/main.test.ts | 8 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/main.ts | 3 | ||||
| -rw-r--r-- | tests/specs/lockfile/no_lock/test.nolock.out | 3 |
12 files changed, 83 insertions, 0 deletions
diff --git a/tests/specs/lockfile/no_lock/__test__.jsonc b/tests/specs/lockfile/no_lock/__test__.jsonc new file mode 100644 index 000000000..60bbd17e0 --- /dev/null +++ b/tests/specs/lockfile/no_lock/__test__.jsonc @@ -0,0 +1,31 @@ +{ + "steps": [{ + "args": "info main.ts", + "output": "fail_initial.out", + "exitCode": 10 + }, { + "args": "info --no-lock main.ts", + "output": "info.nolock.out" + }, { + "args": "bench", + "output": "fail.out", + "exitCode": 10 + }, { + "args": "bench --no-lock", + "output": "bench.nolock.out" + }, { + "args": "doc main.ts", + "exitCode": 10, + "output": "fail.out" + }, { + "args": "doc --no-lock main.ts", + "output": "doc.nolock.out" + }, { + "args": "test", + "exitCode": 10, + "output": "fail.out" + }, { + "args": "test --no-lock", + "output": "test.nolock.out" + }] +} diff --git a/tests/specs/lockfile/no_lock/bench.nolock.out b/tests/specs/lockfile/no_lock/bench.nolock.out new file mode 100644 index 000000000..351efc970 --- /dev/null +++ b/tests/specs/lockfile/no_lock/bench.nolock.out @@ -0,0 +1,5 @@ +Check file:///[WILDCARD]/main.bench.ts +cpu: [WILDCARD] +runtime: [WILDCARD] + +[WILDCARD] diff --git a/tests/specs/lockfile/no_lock/deno.json b/tests/specs/lockfile/no_lock/deno.json new file mode 100644 index 000000000..d6541b78e --- /dev/null +++ b/tests/specs/lockfile/no_lock/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "mod": "http://localhost:4545/lockfile/basic/mod.ts" + } +} diff --git a/tests/specs/lockfile/no_lock/deno.lock b/tests/specs/lockfile/no_lock/deno.lock new file mode 100644 index 000000000..42ab94f9b --- /dev/null +++ b/tests/specs/lockfile/no_lock/deno.lock @@ -0,0 +1,6 @@ +{ + "version": "2", + "remote": { + "http://localhost:4545/lockfile/basic/mod.ts": "invalid" + } +} diff --git a/tests/specs/lockfile/no_lock/doc.nolock.out b/tests/specs/lockfile/no_lock/doc.nolock.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/specs/lockfile/no_lock/doc.nolock.out diff --git a/tests/specs/lockfile/no_lock/fail.out b/tests/specs/lockfile/no_lock/fail.out new file mode 100644 index 000000000..4c2b04423 --- /dev/null +++ b/tests/specs/lockfile/no_lock/fail.out @@ -0,0 +1,3 @@ +error: The source code is invalid, as it does not match the expected hash in the lock file. + Specifier: [WILDCARD]mod.ts + Lock file: [WILDCARD]deno.lock diff --git a/tests/specs/lockfile/no_lock/fail_initial.out b/tests/specs/lockfile/no_lock/fail_initial.out new file mode 100644 index 000000000..6a808c0a5 --- /dev/null +++ b/tests/specs/lockfile/no_lock/fail_initial.out @@ -0,0 +1,4 @@ +Download http://localhost:4545/lockfile/basic/mod.ts +error: The source code is invalid, as it does not match the expected hash in the lock file. + Specifier: [WILDCARD]mod.ts + Lock file: [WILDCARD]deno.lock diff --git a/tests/specs/lockfile/no_lock/info.nolock.out b/tests/specs/lockfile/no_lock/info.nolock.out new file mode 100644 index 000000000..b03661193 --- /dev/null +++ b/tests/specs/lockfile/no_lock/info.nolock.out @@ -0,0 +1,7 @@ +local: [WILDLINE]main.ts +type: TypeScript +dependencies: 1 unique +size: [WILDCARD] + +file:///[WILDCARD]/main.ts ([WILDLINE]) +└── http://localhost:4545/lockfile/basic/mod.ts ([WILDLINE]) diff --git a/tests/specs/lockfile/no_lock/main.bench.ts b/tests/specs/lockfile/no_lock/main.bench.ts new file mode 100644 index 000000000..918adde2f --- /dev/null +++ b/tests/specs/lockfile/no_lock/main.bench.ts @@ -0,0 +1,8 @@ +import { getValue } from "mod"; + +Deno.bench("bench", () => { + const testing = 1 + getValue(); + if (testing !== 6) { + throw "FAIL"; + } +}); diff --git a/tests/specs/lockfile/no_lock/main.test.ts b/tests/specs/lockfile/no_lock/main.test.ts new file mode 100644 index 000000000..fe45c799d --- /dev/null +++ b/tests/specs/lockfile/no_lock/main.test.ts @@ -0,0 +1,8 @@ +import { getValue } from "mod"; + +Deno.test("test", () => { + const testing = 1 + getValue(); + if (testing !== 6) { + throw "FAIL"; + } +}); diff --git a/tests/specs/lockfile/no_lock/main.ts b/tests/specs/lockfile/no_lock/main.ts new file mode 100644 index 000000000..8d07c8153 --- /dev/null +++ b/tests/specs/lockfile/no_lock/main.ts @@ -0,0 +1,3 @@ +import { getValue } from "mod"; + +console.log(getValue()); diff --git a/tests/specs/lockfile/no_lock/test.nolock.out b/tests/specs/lockfile/no_lock/test.nolock.out new file mode 100644 index 000000000..b5039c2d6 --- /dev/null +++ b/tests/specs/lockfile/no_lock/test.nolock.out @@ -0,0 +1,3 @@ +Check file:///[WILDCARD]/main.test.ts +running 1 test from [WILDCARD]/main.test.ts +[WILDCARD] |
