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
wrong message: Expected e
to be of type .... - instead of Expected argument to be of type
#236
Comments
Are you minifying the code? |
It does look like minifier, but I didn't change anything else in my configs. And once I rolled back those dependencies (jest + ts-ject) to older versions - it started working fine again. So it's obviously the problem in ts-jest. Here is my jest.config: module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
modulePathIgnorePatterns: ['<rootDir>/dist/'],
moduleNameMapper: {
'@/(.+)': '<rootDir>/src/$1'
},
clearMocks: true,
resetMocks: true,
testMatch: ['**/tests/**/*.[jt]s?(x)', '<rootDir>/src/**/*.test.ts'],
testPathIgnorePatterns: ['<rootDir>/tests/helpers', '<rootDir>/tests/fixtures', '<rootDir>/tests/dbaccess', '<rootDir>/tests/setupTests.ts'],
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.ts'],
testTimeout: 30000
} here is my tsconfig.json: {
"extends": "@sindresorhus/tsconfig",
"compilerOptions": {
"module": "commonjs",
"target": "es2018",
"esModuleInterop": true,
"sourceMap": true,
"outDir": "dist",
"baseUrl": "./src",
"paths": {
"@/*": ["./*"]
},
"noUncheckedIndexedAccess": false,
"noPropertyAccessFromIndexSignature": false
},
"exclude": ["node_modules", "dist"],
"include": ["src"]
}
|
I experience similar problem in mocha unit tests (will check if it also affects production code) - seeing wrong argument name in error message. |
Simple code:
All of a sudden started giving me the following error message:
Previously it was giving me the right message
This behavior happens during jest test run.
The changes I made in my package.json/devDependencies:
The text was updated successfully, but these errors were encountered: