Skip to content

Commit

Permalink
fix(ergo-explorer, ergo-node): fix vitest hangup
Browse files Browse the repository at this point in the history
Because of a bug in vitest, it doesn't work correctly in multi-threaded
mode on some operating systems (only in some situations).

Disable threads to solve the issue.

Please note that the usage of `singleThread: true` in vitest config is
discouraged, as it runs all of the tests in the same environment, unlike
`threads: false` which runs each test in a child process.

Link to vitest issue (open at the time of commit):
vitest-dev/vitest#2008
  • Loading branch information
mkermani144 committed Oct 1, 2023
1 parent 9b6527b commit 87db574
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/networks/ergo-explorer/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
},
mockReset: true,
watch: false,
threads: false,
},
plugins: [wasm(), topLevelAwait()],
});
1 change: 1 addition & 0 deletions packages/networks/ergo-node/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
},
mockReset: true,
watch: false,
threads: false,
},
plugins: [wasm(), topLevelAwait()],
});

0 comments on commit 87db574

Please sign in to comment.