segmentation fault using jsdom #6760
-
Hey, I'm running tests using a single-threaded setup and I use jsdom. There's some tests relying on canvas that cause segmentation fault issues running in that mode, most of the tests work fine. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Yep, You can use import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
poolMatchGlobs: [
['some/path/to/testfile.test.ts', 'forks'],
],
},
}) Or you could just run all tests in single fork instead of single thread, if that's what you want: import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
poolOptions: { forks: { singleFork: true } },
},
}) |
Beta Was this translation helpful? Give feedback.
Yep,
canvas
doesn't work innode:worker_threads
and requirespool: 'forks'
in Vitest: #2261 (comment)You can use
poolMatchGlobs
to run specific tests inforks
pool:Or you could just run all tests in single fork instead of single thread, if that's what you want: