Replies: 1 comment
-
|
@Bubuioc the add the augmentation import to Jest's setup in your config: {
"jest": {
"setupFiles": [
"<rootDir>/src/modules/messages/typeorm/query.builder.extension"
]
}
}or in export default {
setupFiles: [
'./src/modules/messages/typeorm/query.builder.extension',
],
};this ensures the prototype extensions are loaded before any test runs. ref: Jest setupFiles docs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For this to work i import in my main.ts this
Run project and it is working fine but when i try to run e2e test it fails, saying that my andWhereNotExpired is not a function
package.json
tsconfig.json
{ "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "ES2023", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, "noImplicitAny": false, "strictBindCallApply": false, "noFallthroughCasesInSwitch": false } }Beta Was this translation helpful? Give feedback.
All reactions