summaryrefslogtreecommitdiff
path: root/tests/specs/bundle
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/bundle')
-rw-r--r--tests/specs/bundle/lockfile/__test__.jsonc5
-rw-r--r--tests/specs/bundle/lockfile/check_error.json5
-rw-r--r--tests/specs/bundle/lockfile/check_error.out12
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/specs/bundle/lockfile/__test__.jsonc b/tests/specs/bundle/lockfile/__test__.jsonc
new file mode 100644
index 000000000..3fe64a28b
--- /dev/null
+++ b/tests/specs/bundle/lockfile/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "bundle --lock=check_error.json http://127.0.0.1:4545/subdir/mod1.ts",
+ "output": "check_error.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/bundle/lockfile/check_error.json b/tests/specs/bundle/lockfile/check_error.json
new file mode 100644
index 000000000..a218d7000
--- /dev/null
+++ b/tests/specs/bundle/lockfile/check_error.json
@@ -0,0 +1,5 @@
+{
+ "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/bundle/lockfile/check_error.out b/tests/specs/bundle/lockfile/check_error.out
new file mode 100644
index 000000000..2b8bdfc96
--- /dev/null
+++ b/tests/specs/bundle/lockfile/check_error.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.