aboutsummaryrefslogtreecommitdiff
path: root/test/transpiler/transpiler.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/transpiler/transpiler.test.js')
-rw-r--r--test/transpiler/transpiler.test.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/transpiler/transpiler.test.js b/test/transpiler/transpiler.test.js
index 3040a9913..f83c00296 100644
--- a/test/transpiler/transpiler.test.js
+++ b/test/transpiler/transpiler.test.js
@@ -106,6 +106,13 @@ describe("Bun.Transpiler", () => {
ts.expectPrinted_("import Foo = Baz.Bar;\nexport default Foo;", "const Foo = Baz.Bar;\nexport default Foo");
});
+ it("ternary should parse correctly when parsing typescript fails", () => {
+ ts.expectPrinted_(
+ "var c = Math.random() ? ({ ...{} }) : ({ ...{} })",
+ "var c = Math.random() ? { ...{} } : { ...{} }",
+ );
+ });
+
it.todo("instantiation expressions", async () => {
const exp = ts.expectPrinted_;
const err = ts.expectParseError;