-
Notifications
You must be signed in to change notification settings - Fork 346
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
Akita 7 fails in jest #781
Comments
I've been getting the same error with angular and nx 13. Managed to fix it by changing transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'] to transformIgnorePatterns: ['node_modules/(?!.*.mjs$|@datorama/akita)'] in Adding it to the same regex is very important, it won't work if I keep it in separate strings. |
@theorlovsky Your fix is working perfectly! Thank you very much!!!! |
It works but running my tests (in nx) takes much longer |
The repo is updated now. I'll release new versions soon. |
@NetanelBasal I've upgraded a project to Akita 8.0.0 and I'm still getting this same issue with Jest (where it expects akita isn't going to do an |
Not resolved in version 8. |
@NetanelBasal Upgraded the Unit tests take more time to run. Is there any fix? |
Is this a regression?
No
Description
jest.config.js file:
require('jest-preset-angular/ngcc-jest-processor');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { compilerOptions } = require('./tsconfig');
process.env.TZ = 'UTC';
module.exports = {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['/setup-jest.ts'],
reporters: [ 'default', 'jest-junit' ],
testResultsProcessor: 'jest-junit',
transformIgnorePatterns: [
'/node_modules/(?!lodash-es)',
],
globals: {
'ts-jest': {
tsconfig: '/src/tsconfig.spec.json',
diagnostics: {
ignoreCodes: [151001]
}
}
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '/' }),
modulePathIgnorePatterns: ['/cypress']
};
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
Do you want to create a pull request?
No
The text was updated successfully, but these errors were encountered: