diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-09-25 09:04:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-25 09:04:57 -0400 |
| commit | 8cdb309ffd6686b2f3c4a2126d927fd5770be34d (patch) | |
| tree | 68dfbc0d13e94b9e18f45925d1d5492a7ca6e267 /tests | |
| parent | 5c40b47629bc83b9120019b77b34ced5eaabcffe (diff) | |
fix(check): properly surface dependency errors in types file of js file (#25860)
We weren't surfacing dependency errors in types files of js files.
Diffstat (limited to 'tests')
6 files changed, 21 insertions, 8 deletions
diff --git a/tests/specs/check/dts_importing_non_existent/__test__.jsonc b/tests/specs/check/dts_importing_non_existent/__test__.jsonc new file mode 100644 index 000000000..3775b7fb4 --- /dev/null +++ b/tests/specs/check/dts_importing_non_existent/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check index.js", + "output": "check.out", + "exitCode": 1 +} diff --git a/tests/specs/check/dts_importing_non_existent/check.out b/tests/specs/check/dts_importing_non_existent/check.out new file mode 100644 index 000000000..80ec9593b --- /dev/null +++ b/tests/specs/check/dts_importing_non_existent/check.out @@ -0,0 +1,2 @@ +error: Module not found "file:///[WILDLINE]/test". + at file:///[WILDLINE]/index.d.ts:1:22 diff --git a/tests/specs/check/dts_importing_non_existent/index.d.ts b/tests/specs/check/dts_importing_non_existent/index.d.ts new file mode 100644 index 000000000..4216ca3ed --- /dev/null +++ b/tests/specs/check/dts_importing_non_existent/index.d.ts @@ -0,0 +1 @@ +export { Test } from "./test"; diff --git a/tests/specs/check/dts_importing_non_existent/index.js b/tests/specs/check/dts_importing_non_existent/index.js new file mode 100644 index 000000000..4b2c5ecce --- /dev/null +++ b/tests/specs/check/dts_importing_non_existent/index.js @@ -0,0 +1 @@ +/// <reference types="./index.d.ts" /> diff --git a/tests/specs/run/sloppy_imports/__test__.jsonc b/tests/specs/run/sloppy_imports/__test__.jsonc index 79aaaba69..a992f390b 100644 --- a/tests/specs/run/sloppy_imports/__test__.jsonc +++ b/tests/specs/run/sloppy_imports/__test__.jsonc @@ -1,10 +1,13 @@ { - "steps": [{ - "args": "run main.ts", - "output": "no_sloppy.out", - "exitCode": 1 - }, { - "args": "run --unstable-sloppy-imports main.ts", - "output": "sloppy.out" - }] + "tests": { + "no_sloppy": { + "args": "run --check main.ts", + "output": "no_sloppy.out", + "exitCode": 1 + }, + "sloppy": { + "args": "run --unstable-sloppy-imports --check main.ts", + "output": "sloppy.out" + } + } } diff --git a/tests/specs/run/sloppy_imports/sloppy.out b/tests/specs/run/sloppy_imports/sloppy.out index 170a4bb16..2cc57b6fc 100644 --- a/tests/specs/run/sloppy_imports/sloppy.out +++ b/tests/specs/run/sloppy_imports/sloppy.out @@ -1,3 +1,4 @@ +Check file:///[WILDLINE]/main.ts [class A] [class B] [class C] |
