summaryrefslogtreecommitdiff
path: root/tests/specs/check/package_json_auto_install
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/check/package_json_auto_install')
-rw-r--r--tests/specs/check/package_json_auto_install/__test__.jsonc9
-rw-r--r--tests/specs/check/package_json_auto_install/check.out4
-rw-r--r--tests/specs/check/package_json_auto_install/deno.json3
-rw-r--r--tests/specs/check/package_json_auto_install/lib.ts9
-rw-r--r--tests/specs/check/package_json_auto_install/main.ts3
-rw-r--r--tests/specs/check/package_json_auto_install/package.json5
6 files changed, 33 insertions, 0 deletions
diff --git a/tests/specs/check/package_json_auto_install/__test__.jsonc b/tests/specs/check/package_json_auto_install/__test__.jsonc
new file mode 100644
index 000000000..3fa33cdb7
--- /dev/null
+++ b/tests/specs/check/package_json_auto_install/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "tempDir": true,
+ "steps": [
+ {
+ "args": "check main.ts",
+ "output": "check.out"
+ }
+ ]
+}
diff --git a/tests/specs/check/package_json_auto_install/check.out b/tests/specs/check/package_json_auto_install/check.out
new file mode 100644
index 000000000..db9bd198c
--- /dev/null
+++ b/tests/specs/check/package_json_auto_install/check.out
@@ -0,0 +1,4 @@
+Download http://localhost:4260/@denotest/esm-basic
+Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
+Initialize @denotest/esm-basic@1.0.0
+Check file://[WILDCARD]/main.ts
diff --git a/tests/specs/check/package_json_auto_install/deno.json b/tests/specs/check/package_json_auto_install/deno.json
new file mode 100644
index 000000000..fbd70ec48
--- /dev/null
+++ b/tests/specs/check/package_json_auto_install/deno.json
@@ -0,0 +1,3 @@
+{
+ "nodeModulesDir": "auto"
+}
diff --git a/tests/specs/check/package_json_auto_install/lib.ts b/tests/specs/check/package_json_auto_install/lib.ts
new file mode 100644
index 000000000..1deed81f7
--- /dev/null
+++ b/tests/specs/check/package_json_auto_install/lib.ts
@@ -0,0 +1,9 @@
+import * as test from "@denotest/esm-basic";
+
+export function add(a: number, b: number) {
+ return a + b;
+}
+
+export function getValue() {
+ return test.getValue();
+}
diff --git a/tests/specs/check/package_json_auto_install/main.ts b/tests/specs/check/package_json_auto_install/main.ts
new file mode 100644
index 000000000..e241f3002
--- /dev/null
+++ b/tests/specs/check/package_json_auto_install/main.ts
@@ -0,0 +1,3 @@
+import { getValue } from "./lib.ts";
+
+console.log(getValue());
diff --git a/tests/specs/check/package_json_auto_install/package.json b/tests/specs/check/package_json_auto_install/package.json
new file mode 100644
index 000000000..54ca824d6
--- /dev/null
+++ b/tests/specs/check/package_json_auto_install/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "@denotest/esm-basic": "*"
+ }
+}