summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/npm_tests.rs8
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.d.ts1
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.js1
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/package.json5
-rw-r--r--cli/tests/testdata/npm/types_no_types_entry/main.out4
-rw-r--r--cli/tests/testdata/npm/types_no_types_entry/main.ts4
6 files changed, 23 insertions, 0 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs
index afd023c85..ea577d412 100644
--- a/cli/tests/integration/npm_tests.rs
+++ b/cli/tests/integration/npm_tests.rs
@@ -306,6 +306,14 @@ itest!(types_entry_value_not_exists {
exit_code: 0,
});
+itest!(types_no_types_entry {
+ args: "run --check=all npm/types_no_types_entry/main.ts",
+ output: "npm/types_no_types_entry/main.out",
+ envs: env_vars(),
+ http_server: true,
+ exit_code: 0,
+});
+
#[test]
fn parallel_downloading() {
let (out, _err) = util::run_and_collect_output_with_args(
diff --git a/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.d.ts b/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.d.ts
new file mode 100644
index 000000000..2341a14f0
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.d.ts
@@ -0,0 +1 @@
+export function getValue(): 5;
diff --git a/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.js b/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.js
new file mode 100644
index 000000000..d0c5dbc70
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/dist/main.js
@@ -0,0 +1 @@
+module.exports.getValue = () => 5;
diff --git a/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/package.json
new file mode 100644
index 000000000..377af2bae
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/types-no-types-entry/1.0.0/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "@denotest/types-no-types-entry",
+ "version": "1.0.0",
+ "main": "./dist/main.js"
+}
diff --git a/cli/tests/testdata/npm/types_no_types_entry/main.out b/cli/tests/testdata/npm/types_no_types_entry/main.out
new file mode 100644
index 000000000..6c5d45222
--- /dev/null
+++ b/cli/tests/testdata/npm/types_no_types_entry/main.out
@@ -0,0 +1,4 @@
+Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry
+Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry/1.0.0.tgz
+Check file://[WILDCARD]/types_no_types_entry/main.ts
+5
diff --git a/cli/tests/testdata/npm/types_no_types_entry/main.ts b/cli/tests/testdata/npm/types_no_types_entry/main.ts
new file mode 100644
index 000000000..15e060402
--- /dev/null
+++ b/cli/tests/testdata/npm/types_no_types_entry/main.ts
@@ -0,0 +1,4 @@
+import { getValue } from "npm:@denotest/types-no-types-entry";
+
+const result: 5 = getValue();
+console.log(result);