summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/npm_tests.rs7
-rw-r--r--cli/tests/testdata/npm/d_ext/main.out3
-rw-r--r--cli/tests/testdata/npm/d_ext/main.ts3
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.d.ts1
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.js1
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/package.json5
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/types.d.ts1
7 files changed, 21 insertions, 0 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs
index 25a39b68d..ddbc79cec 100644
--- a/cli/tests/integration/npm_tests.rs
+++ b/cli/tests/integration/npm_tests.rs
@@ -433,6 +433,13 @@ itest!(types_no_types_entry {
exit_code: 1,
});
+itest!(types_d_ext {
+ args: "check --all npm/d_ext/main.ts",
+ output: "npm/d_ext/main.out",
+ envs: env_vars_for_npm_tests(),
+ http_server: true,
+});
+
itest!(typescript_file_in_package {
args: "run npm/typescript_file_in_package/main.ts",
output: "npm/typescript_file_in_package/main.out",
diff --git a/cli/tests/testdata/npm/d_ext/main.out b/cli/tests/testdata/npm/d_ext/main.out
new file mode 100644
index 000000000..e96c6e392
--- /dev/null
+++ b/cli/tests/testdata/npm/d_ext/main.out
@@ -0,0 +1,3 @@
+Download http://localhost:4545/npm/registry/@denotest/d-ext
+Download http://localhost:4545/npm/registry/@denotest/d-ext/1.0.0.tgz
+Check file:///[WILDCARD]/npm/d_ext/main.ts
diff --git a/cli/tests/testdata/npm/d_ext/main.ts b/cli/tests/testdata/npm/d_ext/main.ts
new file mode 100644
index 000000000..c92dbe065
--- /dev/null
+++ b/cli/tests/testdata/npm/d_ext/main.ts
@@ -0,0 +1,3 @@
+import { test } from "npm:@denotest/d-ext";
+
+console.log(test);
diff --git a/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.d.ts b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.d.ts
new file mode 100644
index 000000000..47326c0f6
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.d.ts
@@ -0,0 +1 @@
+export const test: typeof import("./types.d").value;
diff --git a/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.js b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.js
new file mode 100644
index 000000000..62b353f3d
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/index.js
@@ -0,0 +1 @@
+module.exports.test = 5;
diff --git a/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/package.json
new file mode 100644
index 000000000..a0702a56b
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "d-ext",
+ "version": "1.0.0",
+ "main": "./index.js"
+} \ No newline at end of file
diff --git a/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/types.d.ts b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/types.d.ts
new file mode 100644
index 000000000..dedc54b03
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/d-ext/1.0.0/types.d.ts
@@ -0,0 +1 @@
+export const value: 5;