aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js')
-rw-r--r--test/bun.js/transpiler.test.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/bun.js/transpiler.test.js b/test/bun.js/transpiler.test.js
index 94c3d52d2..05607091a 100644
--- a/test/bun.js/transpiler.test.js
+++ b/test/bun.js/transpiler.test.js
@@ -106,6 +106,31 @@ describe("Bun.Transpiler", () => {
ts.expectPrinted_("export = {foo: 123}", "module.exports = { foo: 123 }");
});
+ it("export default class implements TypeScript regression", () => {
+ expect(
+ transpiler
+ .transformSync(
+ `
+ export default class implements ITest {
+ async* runTest(path: string): AsyncGenerator<number> {
+ yield Math.random();
+ }
+ }
+ `,
+ "ts",
+ )
+ .trim(),
+ ).toBe(
+ `
+export default class {
+ async* runTest(path) {
+ yield Math.random();
+ }
+}
+ `.trim(),
+ );
+ });
+
it("satisfies", () => {
ts.expectPrinted_(
"const t1 = { a: 1 } satisfies I1;",