Closed
Description
Description
I am facing a test error after installing the package.
Error: require() of ES Module /Users/hyo/Github/doobooio/dooboo.io/node_modules/@github/combobox-nav/dist/index.js from /Users/hyo/Github/doobooio/dooboo.io/node_modules/@primer/react/lib/drafts/hooks/useCombobox.js not supported.
Instead change the require of index.js in /Users/hyo/Github/doobooio/dooboo.io/node_modules/@primer/react/lib/drafts/hooks/useCombobox.js to a dynamic import() which is available in all CommonJS modules.
I am currently using vitest
. Can I get any clue on the error? I've also tried mocking.
Steps to reproduce
- Clone project
https://github.com/hyochan/react-typescript-vite
- Install package.
- Wrap root with
ThemeProvider
. - Run test
pnpm test
.
Version
v35.9.0
Browser
Chrome