summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-02-05 22:01:48 +1100
committerGitHub <noreply@github.com>2021-02-05 22:01:48 +1100
commit5b9376908af91ca723245b78d3146c1f17107ac4 (patch)
treeb7181f35016237010ab3bd63258dbf703ed2eeee /cli/tests
parent923214c53725651792f6d55c5401bf6b475622ea (diff)
fix(cli/lsp): fix using jsx/tsx when not emitting via tsc (#9407)
Closes #9308 Closes #9023 Closes #8993
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/bundle_jsx.out10
-rw-r--r--cli/tests/integration_tests.rs5
2 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/bundle_jsx.out b/cli/tests/bundle_jsx.out
new file mode 100644
index 000000000..44c9e4555
--- /dev/null
+++ b/cli/tests/bundle_jsx.out
@@ -0,0 +1,10 @@
+[WILDCARD]
+const React = {
+ createElement () {
+ }
+};
+function app() {
+ return React.createElement("div", null, React.createElement("h2", null, "asdf"));
+}
+console.log(app);
+
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index b158c9b55..dd6b740e3 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2702,6 +2702,11 @@ console.log("finish");
output: "bundle.test.out",
});
+ itest!(bundle_jsx {
+ args: "bundle jsx_import_from_ts.ts",
+ output: "bundle_jsx.out",
+ });
+
itest!(fmt_check_tests_dir {
args: "fmt --check ./",
output: "fmt/expected_fmt_check_tests_dir.out",