From 668e2afb99072a8f1f7e5726c4d2246adbaddffb Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Tue, 10 Dec 2024 15:38:51 -0500 Subject: [PATCH] Fix race condition in wasm test (#4740) --- src/lang/wasm.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lang/wasm.test.ts b/src/lang/wasm.test.ts index 74fab1d16d..5cb9c5f237 100644 --- a/src/lang/wasm.test.ts +++ b/src/lang/wasm.test.ts @@ -1,9 +1,13 @@ import { err } from 'lib/trap' -import { parse, ParseResult } from './wasm' +import { initPromise, parse, ParseResult } from './wasm' import { enginelessExecutor } from 'lib/testHelpers' import { Node } from 'wasm-lib/kcl/bindings/Node' import { Program } from '../wasm-lib/kcl/bindings/Program' +beforeEach(async () => { + await initPromise +}) + it('can execute parsed AST', async () => { const code = `x = 1 // A comment.`