Jest, TypeScript, and @solidjs/router
I set up my project with Jest & TypeScript according to https://www.solidjs.com/guides/testing#jest-with-typescript-ts-jest and while it seems to test simple components well, as soon as I try to test a component that uses imports from
@solidjs/router
, jest chokes. I tried reading the documentation linked in the error, but I didn't see anything obviously wrong. Do I need to set up additional configs for @solidjs/router
or is there a bug in that package?
Here's a piece of the error:
Here's the full error, plus what I believe to be the relevant parts of my config files: https://gist.github.com/Kerrick/02e1a837ae3b6736b2cd826568c2ed5e1 Reply
As it turns out, the problem somehow ended up being that I was using a
.babelrc
file. When I switched it to babel.config.js
it started working. 🤷