From a9aef0d017bd053d7f4014c363dbc5898ced1a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 29 Feb 2024 18:35:23 +0000 Subject: 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. --- tests/integration/jsr_tests.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/integration/jsr_tests.rs') 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, +}); -- cgit v1.2.3