summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/file_exists.ts6
-rw-r--r--cli/tests/lock_write_fetch.ts7
2 files changed, 12 insertions, 1 deletions
diff --git a/cli/tests/file_exists.ts b/cli/tests/file_exists.ts
new file mode 100644
index 000000000..5fc5414b3
--- /dev/null
+++ b/cli/tests/file_exists.ts
@@ -0,0 +1,6 @@
+try {
+ await Deno.open(Deno.args[0]);
+ Deno.exit(0);
+} catch (e) {
+ Deno.exit(1);
+}
diff --git a/cli/tests/lock_write_fetch.ts b/cli/tests/lock_write_fetch.ts
index 9e7190596..5a4dea0ce 100644
--- a/cli/tests/lock_write_fetch.ts
+++ b/cli/tests/lock_write_fetch.ts
@@ -32,6 +32,8 @@ const fetchCheckProc = Deno.run({
const fetchCheckProcCode = (await fetchCheckProc.status()).code;
console.log(`fetch check code: ${fetchCheckProcCode}`);
+Deno.removeSync("./lock_write_fetch.json");
+
const runProc = Deno.run({
stdout: "null",
stderr: "null",
@@ -39,7 +41,10 @@ const runProc = Deno.run({
Deno.execPath(),
"run",
"--lock=lock_write_fetch.json",
- "https_import.ts",
+ "--lock-write",
+ "--allow-read",
+ "file_exists.ts",
+ "lock_write_fetch.json",
],
});