mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
tests: add more jsxImportSource regression tests (#15592)
This commit adds some regression tests for using `jsxImportSource` in the config file in combination with an import map. These underlying issues were fixed by #15561. Closes #13389 Closes #14723 --------- Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
106e1bd90e
commit
679a0c428c
6 changed files with 36 additions and 0 deletions
|
@ -48,6 +48,16 @@ itest!(declaration_header_file_with_no_exports {
|
|||
output_str: Some(""),
|
||||
});
|
||||
|
||||
itest!(check_jsximportsource_importmap_config {
|
||||
args: "check --quiet --config check/jsximportsource_importmap_config/deno.json check/jsximportsource_importmap_config/main.tsx",
|
||||
output_str: Some(""),
|
||||
});
|
||||
|
||||
itest!(bundle_jsximportsource_importmap_config {
|
||||
args: "bundle --quiet --config check/jsximportsource_importmap_config/deno.json check/jsximportsource_importmap_config/main.tsx",
|
||||
output: "check/jsximportsource_importmap_config/main.bundle.js",
|
||||
});
|
||||
|
||||
itest!(check_npm_install_diagnostics {
|
||||
args: "check --quiet check/npm_install_diagnostics/main.ts",
|
||||
output: "check/npm_install_diagnostics/main.out",
|
||||
|
|
7
cli/tests/testdata/check/jsximportsource_importmap_config/deno.json
vendored
Normal file
7
cli/tests/testdata/check/jsximportsource_importmap_config/deno.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "jsx"
|
||||
},
|
||||
"importMap": "./import_map.json"
|
||||
}
|
5
cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json
vendored
Normal file
5
cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"imports": {
|
||||
"jsx/jsx-runtime": "./jsx_runtime.ts"
|
||||
}
|
||||
}
|
4
cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts
vendored
Normal file
4
cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
// deno-lint-ignore no-namespace
|
||||
export namespace JSX {
|
||||
export type IntrinsicElements = { [key: string]: unknown };
|
||||
}
|
9
cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js
vendored
Normal file
9
cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
// deno-fmt-ignore-file
|
||||
// deno-lint-ignore-file
|
||||
// This code was bundled using `deno bundle` and it's not recommended to edit it manually
|
||||
|
||||
const makeParagraph = ()=>jsx("p", {
|
||||
children: "A paragraph!"
|
||||
});
|
||||
export { makeParagraph as makeParagraph };
|
||||
|
1
cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx
vendored
Normal file
1
cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export const makeParagraph = () => <p>A paragraph!</p>;
|
Loading…
Reference in a new issue