diff options
Diffstat (limited to 'cli/tests')
4 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/integration/check_tests.rs b/cli/tests/integration/check_tests.rs index dca41a1e4..8000ddc9d 100644 --- a/cli/tests/integration/check_tests.rs +++ b/cli/tests/integration/check_tests.rs @@ -37,3 +37,9 @@ itest!(module_detection_force { args: "check --quiet module_detection_force.ts", output_str: Some(""), }); + +// Regression test for https://github.com/denoland/deno/issues/14937. +itest!(declaration_header_file_with_no_exports { + args: "check --quiet declaration_header_file_with_no_exports.ts", + output_str: Some(""), +}); diff --git a/cli/tests/testdata/declaration_header_file_with_no_exports.ts b/cli/tests/testdata/declaration_header_file_with_no_exports.ts new file mode 100644 index 000000000..ef5da7a38 --- /dev/null +++ b/cli/tests/testdata/declaration_header_file_with_no_exports.ts @@ -0,0 +1,2 @@ +import * as foo from "./declaration_header_file_with_no_exports_js.js"; +console.log(foo); diff --git a/cli/tests/testdata/declaration_header_file_with_no_exports_js.d.ts b/cli/tests/testdata/declaration_header_file_with_no_exports_js.d.ts new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/cli/tests/testdata/declaration_header_file_with_no_exports_js.d.ts diff --git a/cli/tests/testdata/declaration_header_file_with_no_exports_js.js b/cli/tests/testdata/declaration_header_file_with_no_exports_js.js new file mode 100644 index 000000000..b8ae2bcef --- /dev/null +++ b/cli/tests/testdata/declaration_header_file_with_no_exports_js.js @@ -0,0 +1 @@ +/// <reference types="./declaration_header_file_with_no_exports_js.d.ts" /> |