diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-02-29 18:35:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 19:35:23 +0100 |
commit | a9aef0d017bd053d7f4014c363dbc5898ced1a2e (patch) | |
tree | 209e64c11ee936dedd458006e9a17ab345a92b41 /tests/integration/jsr_tests.rs | |
parent | 8d9a54ca1887e4168439ffb9863ac67da066eccc (diff) |
test(jsr): add tests for jsx files with and without pragmas (#22634)
Follow up to https://github.com/denoland/deno/pull/22631 that asserts
behavior when JSX and TSX files have and do not have pragmas with
`jsx*` config.
Diffstat (limited to 'tests/integration/jsr_tests.rs')
-rw-r--r-- | tests/integration/jsr_tests.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/integration/jsr_tests.rs b/tests/integration/jsr_tests.rs index 25a0c8663..f78bea92d 100644 --- a/tests/integration/jsr_tests.rs +++ b/tests/integration/jsr_tests.rs @@ -8,6 +8,7 @@ use test_util::itest; use url::Url; use util::assert_contains; use util::assert_not_contains; +use util::env_vars_for_jsr_npm_tests; use util::env_vars_for_jsr_tests; use util::TestContextBuilder; @@ -477,3 +478,19 @@ fn set_lockfile_pkg_integrity( .unwrap() .integrity = integrity.to_string(); } + +itest!(jsx_with_no_pragmas { + args: "run jsr/jsx_with_no_pragmas/main.ts", + output: "jsr/jsx_with_no_pragmas/main.out", + envs: env_vars_for_jsr_npm_tests(), + http_server: true, + exit_code: 1, +}); + +itest!(jsx_with_pragmas { + args: "run jsr/jsx_with_pragmas/main.ts", + output: "jsr/jsx_with_pragmas/main.out", + envs: env_vars_for_jsr_npm_tests(), + http_server: true, + exit_code: 0, +}); |