Open timkinnane opened 2 years ago
My configs...
tsconfig.json
{
"compilerOptions": {
"baseUrl": "src",
"module": "esnext",
"moduleResolution": "Node",
"lib": ["ESNext"],
"allowJs": true,
"checkJs": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true,
"strict": true
}
}
jest.config.mjs
export default {
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleFileExtensions: [ 'ts', 'tsx', 'mjs', 'js', 'jsx', 'json', 'node' ],
transformIgnorePatterns: ['/node_modules/.*\\.js$'],
transform: {
'\\.(ts|tsx)?$': 'esbuild-runner/jest',
}
}
any updates?
Thanks for the package, it performs well and is simple to set up. ❤️
I'm using it as a Jest transformer and trying to test a function written in Typescript to read a package JSON file:
I get an error from
import.meta.url
being undefined.Possibly related issue in TS-Jest? https://github.com/kulshekhar/ts-jest/issues/1174