Skip to content

segmentation fault using jsdom #6760

Closed Answered by AriPerkkio
bbraun92 asked this question in Q&A
Discussion options

You must be logged in to vote

Yep, canvas doesn't work in node:worker_threads and requires pool: 'forks' in Vitest: #2261 (comment)

You can use poolMatchGlobs to run specific tests in forks pool:

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 } },
  },
})

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@AriPerkkio
Comment options

@bbraun92
Comment options

@bbraun92
Comment options

@AriPerkkio
Comment options

@bbraun92
Comment options

Answer selected by bbraun92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants