Open brielov opened 3 years ago
Hey, thanks
This is going to be tricky because Jest is notorious right now for not handling ESM (as of now). Can you first try with a Node.js 14.x version & see if the issue continues? Odd-versions of Node.js are always experimental/active-development. I'm not current w/ the 15.x release changes, but I'd wager that ESM is affected in some way since it's the latest major addition to the language.
If the issue still persists, I'd recommend something like segfault-handler
so that you can see what is actually throwing the error. Could be a postgres driver. Could be the on-the-fly-rewrite that Jest has/had. Could be something with native ESM loading.
There's a lot of big pieces at play here, so we'll have to tackle them one at a time.
Node 16 is out now too, if you want to upgrade to a major version instead of downgrading.
Jest 27+ has experimental ESM support, which has worked for me in a number of projects now: https://jestjs.io/docs/ecmascript-modules
I have a setup test file where I create a new database and run the migrations within a
beforeAll
block. With0.6.0
it runs fine but with0.7.0
it throwsSIGSEGV
.I'm running node version
15.11.0