Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Plugins/PackageToJS/Templates/bin/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ const harnesses = {
let options = await nodePlatform.defaultNodeSetup({
args: testFrameworkArgs,
onExit: (code) => {
if (code !== 0) { return }
if (code !== 0) {
const stack = new Error().stack
console.error(`Test failed with exit code ${code}`)
console.error(stack)
return
}
// Extract the coverage file from the wasm module
const filePath = "default.profraw"
const destinationPath = args.values["coverage-file"] ?? filePath
Expand All @@ -52,9 +57,9 @@ const harnesses = {
writeFileSync(destinationPath, profraw);
}
},
/* #if USE_SHARED_MEMORY */
/* #if USE_SHARED_MEMORY */
spawnWorker: nodePlatform.createDefaultWorkerFactory(preludeScript)
/* #endif */
/* #endif */
})
if (preludeScript) {
const prelude = await import(preludeScript)
Expand Down