From e70341e65e9f4e44811210c9b24e67a29b2c497a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 25 Oct 2024 13:56:40 -0400 Subject: fix(check): ignore resolving `jsxImportSource` when jsx is not used in graph (#26548) --- tests/specs/check/jsx_import_source_not_in_graph/__test__.jsonc | 4 ++++ tests/specs/check/jsx_import_source_not_in_graph/deno.json | 6 ++++++ tests/specs/check/jsx_import_source_not_in_graph/main.out | 1 + tests/specs/check/jsx_import_source_not_in_graph/main.ts | 1 + 4 files changed, 12 insertions(+) create mode 100644 tests/specs/check/jsx_import_source_not_in_graph/__test__.jsonc create mode 100644 tests/specs/check/jsx_import_source_not_in_graph/deno.json create mode 100644 tests/specs/check/jsx_import_source_not_in_graph/main.out create mode 100644 tests/specs/check/jsx_import_source_not_in_graph/main.ts (limited to 'tests') diff --git a/tests/specs/check/jsx_import_source_not_in_graph/__test__.jsonc b/tests/specs/check/jsx_import_source_not_in_graph/__test__.jsonc new file mode 100644 index 000000000..de0339cfb --- /dev/null +++ b/tests/specs/check/jsx_import_source_not_in_graph/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "check main.ts", + "output": "main.out" +} diff --git a/tests/specs/check/jsx_import_source_not_in_graph/deno.json b/tests/specs/check/jsx_import_source_not_in_graph/deno.json new file mode 100644 index 000000000..219ef515f --- /dev/null +++ b/tests/specs/check/jsx_import_source_not_in_graph/deno.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "npm:preact" + } +} diff --git a/tests/specs/check/jsx_import_source_not_in_graph/main.out b/tests/specs/check/jsx_import_source_not_in_graph/main.out new file mode 100644 index 000000000..1830c3186 --- /dev/null +++ b/tests/specs/check/jsx_import_source_not_in_graph/main.out @@ -0,0 +1 @@ +Check file:///[WILDLINE]/main.ts diff --git a/tests/specs/check/jsx_import_source_not_in_graph/main.ts b/tests/specs/check/jsx_import_source_not_in_graph/main.ts new file mode 100644 index 000000000..bf6b81796 --- /dev/null +++ b/tests/specs/check/jsx_import_source_not_in_graph/main.ts @@ -0,0 +1 @@ +console.log("Hello"); -- cgit v1.2.3