Skip to content

Commit 04cba94

Browse files
Copilothi-ogawa
andauthored
test(rsc): fix flaky scan.test.ts by initializing es-module-lexer WASM in test setup (#1038)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: hi-ogawa <4232207+hi-ogawa@users.noreply.github.com> Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com>
1 parent 687458d commit 04cba94

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/plugin-rsc/src/plugins/scan.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
import { describe, expect, it } from 'vitest'
1+
import { beforeAll, describe, expect, it } from 'vitest'
2+
import * as esModuleLexer from 'es-module-lexer'
23
import { transformScanBuildStrip } from './scan'
34

45
describe(transformScanBuildStrip, () => {
6+
beforeAll(async () => {
7+
await esModuleLexer.init
8+
})
9+
510
it('basic', async () => {
611
const input = `\
712
import { a } from "a";

0 commit comments

Comments
 (0)