Skip to content

Commit 8cabf98

Browse files
committed
fixup: another one, this time for classes
1 parent 609a78a commit 8cabf98

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/async-rewriter2/src/async-writer-babel.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,13 @@ describe('AsyncWriter', function () {
256256
expect(ctx.A).to.equal(A);
257257
});
258258

259+
it('can initialize immediately after a class definition', function () {
260+
const A = runTranspiledCode(
261+
'class A { prop = 42; }\nconst foo = new A(); foo'
262+
);
263+
expect(A.prop).to.equal(42);
264+
});
265+
259266
it.skip('does not move classes from block scopes to the top-level scope', function () {
260267
const A = runTranspiledCode('{ class A {} }');
261268
expect(A).to.equal(undefined);

0 commit comments

Comments
 (0)