New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import.meta
not available in Jest
#44
Comments
My configs...
{
"compilerOptions": {
"baseUrl": "src",
"module": "esnext",
"moduleResolution": "Node",
"lib": ["ESNext"],
"allowJs": true,
"checkJs": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true,
"strict": true
}
}
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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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? kulshekhar/ts-jest#1174
The text was updated successfully, but these errors were encountered: