summaryrefslogtreecommitdiff
path: root/tests/specs/lockfile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/lockfile')
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/add.ts1
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/deno.json9
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/lock01.out20
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/lock02.out24
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/subtract.ts1
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/add.ts1
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/deno.json8
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out26
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out31
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts1
-rw-r--r--tests/specs/lockfile/adding_npm_dep/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_npm_dep/add.ts1
-rw-r--r--tests/specs/lockfile/adding_npm_dep/deno.json9
-rw-r--r--tests/specs/lockfile/adding_npm_dep/lock01.out21
-rw-r--r--tests/specs/lockfile/adding_npm_dep/lock02.out26
-rw-r--r--tests/specs/lockfile/adding_npm_dep/subtract.ts1
-rw-r--r--tests/specs/lockfile/adding_redirect/1.ts1
-rw-r--r--tests/specs/lockfile/adding_redirect/2.ts1
-rw-r--r--tests/specs/lockfile/adding_redirect/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_redirect/deno.json5
-rw-r--r--tests/specs/lockfile/adding_redirect/lock01.out6
-rw-r--r--tests/specs/lockfile/adding_redirect/lock02.out9
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/deno.json3
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/deno.lock7
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/main.out13
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/main.ts1
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/deno.json2
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/deno.lock6
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/run.out12
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc13
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/deno.lock7
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/false.json3
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/false.main.out2
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/main.ts1
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/true.json3
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/true.main.out11
-rw-r--r--tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out1
-rw-r--r--tests/specs/lockfile/config_file_lock_path/__test__.jsonc13
-rw-r--r--tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json3
-rw-r--r--tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out11
-rw-r--r--tests/specs/lockfile/config_file_lock_path/lock_check_err2.json10
-rw-r--r--tests/specs/lockfile/config_file_lock_path/lock_check_err2.out11
-rw-r--r--tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json13
-rw-r--r--tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json14
-rw-r--r--tests/specs/lockfile/lock_check_err/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_check_err/lock_check_err.json4
-rw-r--r--tests/specs/lockfile/lock_check_err/lock_check_err.out11
-rw-r--r--tests/specs/lockfile/lock_check_err2/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_check_err2/lock_check_err2.json10
-rw-r--r--tests/specs/lockfile/lock_check_err2/lock_check_err2.out11
-rw-r--r--tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json6
-rw-r--r--tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out12
-rw-r--r--tests/specs/lockfile/lock_v2_check_err/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json7
-rw-r--r--tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out11
-rw-r--r--tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json13
-rw-r--r--tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out11
-rw-r--r--tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json9
-rw-r--r--tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out12
-rw-r--r--tests/specs/lockfile/no_lock/__test__.jsonc67
-rw-r--r--tests/specs/lockfile/no_lock/bench.nolock.out1
-rw-r--r--tests/specs/lockfile/no_lock/doc.nolock.out1
-rw-r--r--tests/specs/lockfile/no_lock/fail.out15
-rw-r--r--tests/specs/lockfile/no_lock/fail_initial.out4
-rw-r--r--tests/specs/lockfile/no_lock/info.nolock.out1
-rw-r--r--tests/specs/lockfile/no_lock/test.nolock.out1
73 files changed, 637 insertions, 36 deletions
diff --git a/tests/specs/lockfile/adding_jsr_dep/__test__.jsonc b/tests/specs/lockfile/adding_jsr_dep/__test__.jsonc
new file mode 100644
index 000000000..905aaf49c
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run add.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run subtract.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/add.ts b/tests/specs/lockfile/adding_jsr_dep/add.ts
new file mode 100644
index 000000000..c0fe70808
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/add.ts
@@ -0,0 +1 @@
+import "add";
diff --git a/tests/specs/lockfile/adding_jsr_dep/deno.json b/tests/specs/lockfile/adding_jsr_dep/deno.json
new file mode 100644
index 000000000..c37f65adc
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/deno.json
@@ -0,0 +1,9 @@
+{
+ "tasks": {
+ "cat": "cat"
+ },
+ "imports": {
+ "add": "jsr:@denotest/add@1",
+ "subtract": "jsr:@denotest/subtract@1"
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/lock01.out b/tests/specs/lockfile/adding_jsr_dep/lock01.out
new file mode 100644
index 000000000..0ac007526
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/lock01.out
@@ -0,0 +1,20 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/add@1",
+ "jsr:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/lock02.out b/tests/specs/lockfile/adding_jsr_dep/lock02.out
new file mode 100644
index 000000000..4293c7dfe
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/lock02.out
@@ -0,0 +1,24 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0",
+ "jsr:@denotest/subtract@1": "jsr:@denotest/subtract@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ },
+ "@denotest/subtract@1.0.0": {
+ "integrity": "[WILDLINE]"
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/add@1",
+ "jsr:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/subtract.ts b/tests/specs/lockfile/adding_jsr_dep/subtract.ts
new file mode 100644
index 000000000..b07f2cdfd
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/subtract.ts
@@ -0,0 +1 @@
+import "subtract";
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc b/tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc
new file mode 100644
index 000000000..905aaf49c
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run add.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run subtract.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/add.ts b/tests/specs/lockfile/adding_jsr_export_new_dep/add.ts
new file mode 100644
index 000000000..06492d2ec
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/add.ts
@@ -0,0 +1 @@
+import "different-deps-per-export/add";
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/deno.json b/tests/specs/lockfile/adding_jsr_export_new_dep/deno.json
new file mode 100644
index 000000000..b26a08521
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/deno.json
@@ -0,0 +1,8 @@
+{
+ "tasks": {
+ "cat": "cat"
+ },
+ "imports": {
+ "different-deps-per-export": "jsr:@denotest/different-deps-per-export@1"
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out b/tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out
new file mode 100644
index 000000000..e78ea355a
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out
@@ -0,0 +1,26 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0",
+ "jsr:@denotest/different-deps-per-export@1": "jsr:@denotest/different-deps-per-export@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ },
+ "@denotest/different-deps-per-export@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": [
+ "jsr:@denotest/add@1"
+ ]
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/different-deps-per-export@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out b/tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out
new file mode 100644
index 000000000..0f4a388c6
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out
@@ -0,0 +1,31 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0",
+ "jsr:@denotest/different-deps-per-export@1": "jsr:@denotest/different-deps-per-export@1.0.0",
+ "jsr:@denotest/subtract@1": "jsr:@denotest/subtract@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ },
+ "@denotest/different-deps-per-export@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": [
+ "jsr:@denotest/add@1",
+ "jsr:@denotest/subtract@1"
+ ]
+ },
+ "@denotest/subtract@1.0.0": {
+ "integrity": "[WILDLINE]"
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/different-deps-per-export@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts b/tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts
new file mode 100644
index 000000000..1576e29e2
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts
@@ -0,0 +1 @@
+import "different-deps-per-export/subtract";
diff --git a/tests/specs/lockfile/adding_npm_dep/__test__.jsonc b/tests/specs/lockfile/adding_npm_dep/__test__.jsonc
new file mode 100644
index 000000000..905aaf49c
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run add.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run subtract.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/add.ts b/tests/specs/lockfile/adding_npm_dep/add.ts
new file mode 100644
index 000000000..c0fe70808
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/add.ts
@@ -0,0 +1 @@
+import "add";
diff --git a/tests/specs/lockfile/adding_npm_dep/deno.json b/tests/specs/lockfile/adding_npm_dep/deno.json
new file mode 100644
index 000000000..b3bfef815
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/deno.json
@@ -0,0 +1,9 @@
+{
+ "tasks": {
+ "cat": "cat"
+ },
+ "imports": {
+ "add": "npm:@denotest/add@1",
+ "subtract": "npm:@denotest/subtract@1"
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/lock01.out b/tests/specs/lockfile/adding_npm_dep/lock01.out
new file mode 100644
index 000000000..5d5567dc0
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/lock01.out
@@ -0,0 +1,21 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "npm:@denotest/add@1": "npm:@denotest/add@1.0.0"
+ },
+ "npm": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "npm:@denotest/add@1",
+ "npm:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/lock02.out b/tests/specs/lockfile/adding_npm_dep/lock02.out
new file mode 100644
index 000000000..6042b1cb9
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/lock02.out
@@ -0,0 +1,26 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "npm:@denotest/add@1": "npm:@denotest/add@1.0.0",
+ "npm:@denotest/subtract@1": "npm:@denotest/subtract@1.0.0"
+ },
+ "npm": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ },
+ "@denotest/subtract@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "npm:@denotest/add@1",
+ "npm:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/subtract.ts b/tests/specs/lockfile/adding_npm_dep/subtract.ts
new file mode 100644
index 000000000..b07f2cdfd
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/subtract.ts
@@ -0,0 +1 @@
+import "subtract";
diff --git a/tests/specs/lockfile/adding_redirect/1.ts b/tests/specs/lockfile/adding_redirect/1.ts
new file mode 100644
index 000000000..7556f2266
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/1.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/welcome.ts";
diff --git a/tests/specs/lockfile/adding_redirect/2.ts b/tests/specs/lockfile/adding_redirect/2.ts
new file mode 100644
index 000000000..525b6bc7e
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/2.ts
@@ -0,0 +1 @@
+import "http://localhost:4546/welcome.ts";
diff --git a/tests/specs/lockfile/adding_redirect/__test__.jsonc b/tests/specs/lockfile/adding_redirect/__test__.jsonc
new file mode 100644
index 000000000..d53beedbd
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run 1.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run 2.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_redirect/deno.json b/tests/specs/lockfile/adding_redirect/deno.json
new file mode 100644
index 000000000..75cddd826
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/deno.json
@@ -0,0 +1,5 @@
+{
+ "tasks": {
+ "cat": "cat"
+ }
+}
diff --git a/tests/specs/lockfile/adding_redirect/lock01.out b/tests/specs/lockfile/adding_redirect/lock01.out
new file mode 100644
index 000000000..f00cefa6a
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/lock01.out
@@ -0,0 +1,6 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4545/welcome.ts": "7353d5fcbc36c45d26bcbca478cf973092523b07c45999f41319820092b4de31"
+ }
+}
diff --git a/tests/specs/lockfile/adding_redirect/lock02.out b/tests/specs/lockfile/adding_redirect/lock02.out
new file mode 100644
index 000000000..70c38c966
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/lock02.out
@@ -0,0 +1,9 @@
+{
+ "version": "3",
+ "redirects": {
+ "http://localhost:4546/welcome.ts": "http://localhost:4545/welcome.ts"
+ },
+ "remote": {
+ "http://localhost:4545/welcome.ts": "7353d5fcbc36c45d26bcbca478cf973092523b07c45999f41319820092b4de31"
+ }
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc b/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc
new file mode 100644
index 000000000..50213381a
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run main.ts",
+ "output": "main.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/deno.json b/tests/specs/lockfile/auto_discover_lockfile/deno.json
new file mode 100644
index 000000000..90faa728a
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/deno.json
@@ -0,0 +1,3 @@
+{
+ "tasks": {}
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/deno.lock b/tests/specs/lockfile/auto_discover_lockfile/deno.lock
new file mode 100644
index 000000000..059f66789
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/deno.lock
@@ -0,0 +1,7 @@
+{
+ "version": "2",
+ "remote": {
+ "http://localhost:4545/subdir/mod2.ts": "cae1d3e9f3c38cd415ff52dff854be8f3d17d35f8d7b3d285e813fb0f6393a2f",
+ "http://localhost:4545/subdir/print_hello.ts": "foobar"
+ }
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/main.out b/tests/specs/lockfile/auto_discover_lockfile/main.out
new file mode 100644
index 000000000..aa24320d1
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/main.out
@@ -0,0 +1,13 @@
+Download http://localhost:4545/subdir/mod2.ts
+Download http://localhost:4545/subdir/print_hello.ts
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/print_hello.ts
+ Actual: fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c
+ Expected: foobar
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/auto_discover_lockfile/main.ts b/tests/specs/lockfile/auto_discover_lockfile/main.ts
new file mode 100644
index 000000000..baa52775d
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/main.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/subdir/mod2.ts";
diff --git a/tests/specs/lockfile/checksum_at_redirect/__test__.jsonc b/tests/specs/lockfile/checksum_at_redirect/__test__.jsonc
new file mode 100644
index 000000000..66d9850da
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --config=deno.json http://localhost:4546/run/001_hello.js",
+ "output": "run.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/checksum_at_redirect/deno.json b/tests/specs/lockfile/checksum_at_redirect/deno.json
new file mode 100644
index 000000000..2c63c0851
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/deno.json
@@ -0,0 +1,2 @@
+{
+}
diff --git a/tests/specs/lockfile/checksum_at_redirect/deno.lock b/tests/specs/lockfile/checksum_at_redirect/deno.lock
new file mode 100644
index 000000000..12e84cd01
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/deno.lock
@@ -0,0 +1,6 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4546/run/001_hello.js": "c479db5ea26965387423ca438bb977d0b4788d5901efcef52f69871e4c1048c5"
+ }
+}
diff --git a/tests/specs/lockfile/checksum_at_redirect/run.out b/tests/specs/lockfile/checksum_at_redirect/run.out
new file mode 100644
index 000000000..75a34777f
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/run.out
@@ -0,0 +1,12 @@
+Download http://localhost:4546/run/001_hello.js
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4546/run/001_hello.js
+ Actual: Redirect to http://localhost:4545/run/001_hello.js
+ Expected: c479db5ea26965387423ca438bb977d0b4788d5901efcef52f69871e4c1048c5
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc b/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc
new file mode 100644
index 000000000..65679a1c8
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc
@@ -0,0 +1,13 @@
+{
+ "tests": {
+ "true": {
+ "args": "run --config=true.json main.ts",
+ "output": "true.main.out",
+ "exitCode": 10
+ },
+ "false": {
+ "args": "run --config=false.json main.ts",
+ "output": "false.main.out"
+ }
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/deno.lock b/tests/specs/lockfile/config_file_lock_boolean/deno.lock
new file mode 100644
index 000000000..059f66789
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/deno.lock
@@ -0,0 +1,7 @@
+{
+ "version": "2",
+ "remote": {
+ "http://localhost:4545/subdir/mod2.ts": "cae1d3e9f3c38cd415ff52dff854be8f3d17d35f8d7b3d285e813fb0f6393a2f",
+ "http://localhost:4545/subdir/print_hello.ts": "foobar"
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/false.json b/tests/specs/lockfile/config_file_lock_boolean/false.json
new file mode 100644
index 000000000..358b7d299
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/false.json
@@ -0,0 +1,3 @@
+{
+ "lock": false
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/false.main.out b/tests/specs/lockfile/config_file_lock_boolean/false.main.out
new file mode 100644
index 000000000..0d8f0a237
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/false.main.out
@@ -0,0 +1,2 @@
+Download http://localhost:4545/subdir/mod2.ts
+Download http://localhost:4545/subdir/print_hello.ts
diff --git a/tests/specs/lockfile/config_file_lock_boolean/main.ts b/tests/specs/lockfile/config_file_lock_boolean/main.ts
new file mode 100644
index 000000000..baa52775d
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/main.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/subdir/mod2.ts";
diff --git a/tests/specs/lockfile/config_file_lock_boolean/true.json b/tests/specs/lockfile/config_file_lock_boolean/true.json
new file mode 100644
index 000000000..090481af9
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/true.json
@@ -0,0 +1,3 @@
+{
+ "lock": true
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/true.main.out b/tests/specs/lockfile/config_file_lock_boolean/true.main.out
new file mode 100644
index 000000000..11dfc0740
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/true.main.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/print_hello.ts
+ Actual: fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c
+ Expected: foobar
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out b/tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out
new file mode 100644
index 000000000..b3e94678c
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out
@@ -0,0 +1 @@
+[WILDCARD]success true true true true true true true true
diff --git a/tests/specs/lockfile/config_file_lock_path/__test__.jsonc b/tests/specs/lockfile/config_file_lock_path/__test__.jsonc
new file mode 100644
index 000000000..defb113b3
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/__test__.jsonc
@@ -0,0 +1,13 @@
+{
+ "tests": {
+ "error_bad_checksum": {
+ "args": "run --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
+ "output": "config_file_lock_path.out",
+ "exitCode": 10
+ },
+ "lock_flag_override": {
+ "args": "run --lock=run/lock_check_ok2.json --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
+ "output": "019_media_types.ts.out"
+ }
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json
new file mode 100644
index 000000000..2c393f76e
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json
@@ -0,0 +1,3 @@
+{
+ "lock": "./lock_check_err2.json"
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.json b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.json
new file mode 100644
index 000000000..a59cbc9e3
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.json
@@ -0,0 +1,10 @@
+{
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "bad",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json b/tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json
new file mode 100644
index 000000000..14d8b7117
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json
@@ -0,0 +1,13 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json b/tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json
new file mode 100644
index 000000000..e1bf67c8f
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json
@@ -0,0 +1,14 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4545/run/019_media_types.ts": "6b099d422b8a83e19d6672ad28c1c42dd3523eaadd8029f185bf4d10c1dc6e92",
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+ }
+}
diff --git a/tests/specs/lockfile/lock_check_err/__test__.jsonc b/tests/specs/lockfile/lock_check_err/__test__.jsonc
new file mode 100644
index 000000000..7b4777fad
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_check_err.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ "output": "lock_check_err.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_check_err/lock_check_err.json b/tests/specs/lockfile/lock_check_err/lock_check_err.json
new file mode 100644
index 000000000..fc6c2d45c
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err/lock_check_err.json
@@ -0,0 +1,4 @@
+{
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/run/003_relative_import.ts": "bad"
+}
diff --git a/tests/specs/lockfile/lock_check_err/lock_check_err.out b/tests/specs/lockfile/lock_check_err/lock_check_err.out
new file mode 100644
index 000000000..25d22490d
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err/lock_check_err.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/run/003_relative_import.ts
+ Actual: a1572e8fd2c2712b33f04aed2561505b5feb2c8696f1f2cded3de7127931b97e
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_check_err2/__test__.jsonc b/tests/specs/lockfile/lock_check_err2/__test__.jsonc
new file mode 100644
index 000000000..adcf816c4
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err2/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_check_err2.json http://localhost:4545/run/019_media_types.ts",
+ "output": "lock_check_err2.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_check_err2/lock_check_err2.json b/tests/specs/lockfile/lock_check_err2/lock_check_err2.json
new file mode 100644
index 000000000..a59cbc9e3
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err2/lock_check_err2.json
@@ -0,0 +1,10 @@
+{
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "bad",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+}
diff --git a/tests/specs/lockfile/lock_check_err2/lock_check_err2.out b/tests/specs/lockfile/lock_check_err2/lock_check_err2.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err2/lock_check_err2.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc b/tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc
new file mode 100644
index 000000000..54b993295
--- /dev/null
+++ b/tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/run/013_dynamic_import.ts",
+ "output": "lock_dynamic_imports.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json
new file mode 100644
index 000000000..0269b9409
--- /dev/null
+++ b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json
@@ -0,0 +1,6 @@
+{
+ "http://127.0.0.1:4545/run/013_dynamic_import.ts": "3f83e653329dc1f963761a986997d710b9763f667fc243eef89b3a5decacda30",
+ "http://127.0.0.1:4545/subdir/mod1.ts": "bfc1037b02c99abc20367f739bca7455813a5950066abd77965bff33b6eece0f",
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/subdir/subdir2/mod2.ts": "bad"
+}
diff --git a/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out
new file mode 100644
index 000000000..2b8bdfc96
--- /dev/null
+++ b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out
@@ -0,0 +1,12 @@
+[WILDCARD]
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/subdir/subdir2/mod2.ts
+ Actual: 8b3b670d25d238dfa72df119140406b96766a00fee635f3606429fe065b18fd1
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_v2_check_err/__test__.jsonc b/tests/specs/lockfile/lock_v2_check_err/__test__.jsonc
new file mode 100644
index 000000000..b58fddeec
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_v2_check_err.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ "output": "lock_v2_check_err.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json
new file mode 100644
index 000000000..6bd6491c6
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json
@@ -0,0 +1,7 @@
+{
+ "version": "2",
+ "remote": {
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/run/003_relative_import.ts": "bad"
+ }
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out
new file mode 100644
index 000000000..25d22490d
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/run/003_relative_import.ts
+ Actual: a1572e8fd2c2712b33f04aed2561505b5feb2c8696f1f2cded3de7127931b97e
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc b/tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc
new file mode 100644
index 000000000..bb02b41e2
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_v2_check_err2.json http://localhost:4545/run/019_media_types.ts",
+ "output": "lock_v2_check_err2.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json
new file mode 100644
index 000000000..30fbcdf4b
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json
@@ -0,0 +1,13 @@
+{
+ "version": "2",
+ "remote": {
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "bad",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+ }
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc b/tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc
new file mode 100644
index 000000000..8d8913431
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_v2_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/run/013_dynamic_import.ts",
+ "output": "lock_v2_dynamic_imports.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json
new file mode 100644
index 000000000..eadbee272
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json
@@ -0,0 +1,9 @@
+{
+ "version": "2",
+ "remote": {
+ "http://127.0.0.1:4545/run/013_dynamic_import.ts": "3f83e653329dc1f963761a986997d710b9763f667fc243eef89b3a5decacda30",
+ "http://127.0.0.1:4545/subdir/mod1.ts": "bfc1037b02c99abc20367f739bca7455813a5950066abd77965bff33b6eece0f",
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/subdir/subdir2/mod2.ts": "bad"
+ }
+}
diff --git a/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out
new file mode 100644
index 000000000..2b8bdfc96
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out
@@ -0,0 +1,12 @@
+[WILDCARD]
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/subdir/subdir2/mod2.ts
+ Actual: 8b3b670d25d238dfa72df119140406b96766a00fee635f3606429fe065b18fd1
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/no_lock/__test__.jsonc b/tests/specs/lockfile/no_lock/__test__.jsonc
index 60bbd17e0..75821ac64 100644
--- a/tests/specs/lockfile/no_lock/__test__.jsonc
+++ b/tests/specs/lockfile/no_lock/__test__.jsonc
@@ -1,31 +1,40 @@
{
- "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"
- }]
+ "tests": {
+ "info": {
+ "args": "info main.ts",
+ "output": "fail.out",
+ "exitCode": 10
+ },
+ "info_no_lock": {
+ "args": "info --no-lock main.ts",
+ "output": "info.nolock.out"
+ },
+ "bench": {
+ "args": "bench",
+ "output": "fail.out",
+ "exitCode": 10
+ },
+ "bench_no_lock": {
+ "args": "bench --no-lock",
+ "output": "bench.nolock.out"
+ },
+ "doc": {
+ "args": "doc main.ts",
+ "exitCode": 10,
+ "output": "fail.out"
+ },
+ "doc_no_lock": {
+ "args": "doc --no-lock main.ts",
+ "output": "doc.nolock.out"
+ },
+ "test": {
+ "args": "test",
+ "exitCode": 10,
+ "output": "fail.out"
+ },
+ "test_no_lock": {
+ "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
index 351efc970..83e4de242 100644
--- a/tests/specs/lockfile/no_lock/bench.nolock.out
+++ b/tests/specs/lockfile/no_lock/bench.nolock.out
@@ -1,3 +1,4 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
Check file:///[WILDCARD]/main.bench.ts
cpu: [WILDCARD]
runtime: [WILDCARD]
diff --git a/tests/specs/lockfile/no_lock/doc.nolock.out b/tests/specs/lockfile/no_lock/doc.nolock.out
index e69de29bb..e2d66c027 100644
--- a/tests/specs/lockfile/no_lock/doc.nolock.out
+++ b/tests/specs/lockfile/no_lock/doc.nolock.out
@@ -0,0 +1 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
diff --git a/tests/specs/lockfile/no_lock/fail.out b/tests/specs/lockfile/no_lock/fail.out
index 4c2b04423..0d67cd478 100644
--- a/tests/specs/lockfile/no_lock/fail.out
+++ b/tests/specs/lockfile/no_lock/fail.out
@@ -1,3 +1,12 @@
-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
+Download http://localhost:4545/lockfile/basic/mod.ts
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/lockfile/basic/mod.ts
+ Actual: [WILDLINE]
+ Expected: invalid
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/no_lock/fail_initial.out b/tests/specs/lockfile/no_lock/fail_initial.out
deleted file mode 100644
index 6a808c0a5..000000000
--- a/tests/specs/lockfile/no_lock/fail_initial.out
+++ /dev/null
@@ -1,4 +0,0 @@
-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
index b03661193..313377780 100644
--- a/tests/specs/lockfile/no_lock/info.nolock.out
+++ b/tests/specs/lockfile/no_lock/info.nolock.out
@@ -1,3 +1,4 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
local: [WILDLINE]main.ts
type: TypeScript
dependencies: 1 unique
diff --git a/tests/specs/lockfile/no_lock/test.nolock.out b/tests/specs/lockfile/no_lock/test.nolock.out
index b5039c2d6..1332dfa8f 100644
--- a/tests/specs/lockfile/no_lock/test.nolock.out
+++ b/tests/specs/lockfile/no_lock/test.nolock.out
@@ -1,3 +1,4 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
Check file:///[WILDCARD]/main.test.ts
running 1 test from [WILDCARD]/main.test.ts
[WILDCARD]