Hi,
first of all, thanks for maintaining this - amazing work. And quite brave tbh 😄
I'd like to know, if you've managed to make it compatible with @testing-library/jest-native somehow? As soon as I setup it, I get:
SyntaxError: Cannot use import statement outside a module
❯ Object.<anonymous> node_modules/@testing-library/jest-native/dist/to-be-visible.js:4:24
Module node_modules/react-native/index.js:14 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "react-native" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
// vitest.config.js
export default {
test: {
deps: {
inline: [
"react-native"
]
}
}
}
The recommendation provided in the error does not work and I'm out of ideas…
Hi, first of all, thanks for maintaining this - amazing work. And quite brave tbh 😄
I'd like to know, if you've managed to make it compatible with @testing-library/jest-native somehow? As soon as I setup it, I get:
The recommendation provided in the error does not work and I'm out of ideas…