summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration_tests.rs13
-rw-r--r--cli/tests/lock_check_err.json2
-rw-r--r--cli/tests/lock_dynamic_imports.json6
-rw-r--r--cli/tests/lock_dynamic_imports.out3
-rw-r--r--cli/tests/lock_write_requires_lock.out3
5 files changed, 26 insertions, 1 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 6f8299c92..6855df707 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -1562,6 +1562,12 @@ itest!(js_import_detect {
exit_code: 0,
});
+itest!(lock_write_requires_lock {
+ args: "run --lock-write some_file.ts",
+ output: "lock_write_requires_lock.out",
+ exit_code: 1,
+});
+
itest!(lock_write_fetch {
args:
"run --quiet --allow-read --allow-write --allow-env --allow-run lock_write_fetch.ts",
@@ -1582,6 +1588,13 @@ itest_ignore!(lock_check_ok2 {
http_server: true,
});
+itest!(lock_dynamic_imports {
+ args: "run --lock=lock_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/cli/tests/013_dynamic_import.ts",
+ output: "lock_dynamic_imports.out",
+ exit_code: 10,
+ http_server: true,
+});
+
itest!(lock_check_err {
args: "run --lock=lock_check_err.json http://127.0.0.1:4545/cli/tests/003_relative_import.ts",
output: "lock_check_err.out",
diff --git a/cli/tests/lock_check_err.json b/cli/tests/lock_check_err.json
index 43fc53227..55a1446d4 100644
--- a/cli/tests/lock_check_err.json
+++ b/cli/tests/lock_check_err.json
@@ -1,4 +1,4 @@
{
- "http://127.0.0.1:4545/cli/tests/subdir/print_hello.ts": "5c93c66125878389f47f4abcac003f4be1276c5223612c26302460d71841e287",
+ "http://127.0.0.1:4545/cli/tests/subdir/print_hello.ts": "fe7bbccaedb6579200a8b582f905139296402d06b1b91109d6e12c41a23125da",
"http://127.0.0.1:4545/cli/tests/003_relative_import.ts": "bad"
}
diff --git a/cli/tests/lock_dynamic_imports.json b/cli/tests/lock_dynamic_imports.json
new file mode 100644
index 000000000..df77e179c
--- /dev/null
+++ b/cli/tests/lock_dynamic_imports.json
@@ -0,0 +1,6 @@
+{
+ "http://127.0.0.1:4545/cli/tests/013_dynamic_import.ts": "c875f10de49bded1ad76f1709d68e6cf2c0cfb8e8e862542a3fcb4ab09257b99",
+ "http://127.0.0.1:4545/cli/tests/subdir/mod1.ts": "f627f1649f9853adfa096241ae2defa75e4e327cbeb6af0e82a11304b3e5c8be",
+ "http://127.0.0.1:4545/cli/tests/subdir/print_hello.ts": "fe7bbccaedb6579200a8b582f905139296402d06b1b91109d6e12c41a23125da",
+ "http://127.0.0.1:4545/cli/tests/subdir/subdir2/mod2.ts": "bad"
+}
diff --git a/cli/tests/lock_dynamic_imports.out b/cli/tests/lock_dynamic_imports.out
new file mode 100644
index 000000000..57bc053b9
--- /dev/null
+++ b/cli/tests/lock_dynamic_imports.out
@@ -0,0 +1,3 @@
+[WILDCARD]
+Subresource integrity check failed --lock=lock_dynamic_imports.json
+http://127.0.0.1:4545/cli/tests/subdir/subdir2/mod2.ts
diff --git a/cli/tests/lock_write_requires_lock.out b/cli/tests/lock_write_requires_lock.out
new file mode 100644
index 000000000..7cc5906f6
--- /dev/null
+++ b/cli/tests/lock_write_requires_lock.out
@@ -0,0 +1,3 @@
+error: The following required arguments were not provided:
+ --lock <FILE>
+[WILDCARD] \ No newline at end of file