Skip to content

Commit 7efbdc6

Browse files
committed
wasm: test shows a module's output before the events after it
1 parent 5071158 commit 7efbdc6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎wasm/main.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func test(this js.Value, args []js.Value) any {
195195
var mu sync.Mutex
196196
var passed, failed, skipped int
197197
emit := func(e testEvent) {
198+
out.Flush() // what the modules printed before the event shows before it
198199
if onEvent.Type() == js.TypeFunction {
199200
b, _ := json.Marshal(e)
200201
call(onEvent, string(b))

0 commit comments

Comments
 (0)