forwardemail / forwardemail/supertest
Class extends value undefined
- Dominant language
- JavaScript
- Stars
- 14.4k
- Forks
- 782
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am getting error
```
TypeError: Class extends value undefined is not a constructor or null
at Object. (../node_modules/supertest/lib/test.js:15:20)
at Object. (../node_modules/supertest/index.js:14:14)
```
When trying to run supertest on my app. through jest --silent
supertest version -> 6.3.1
Test code
```
import supertest from 'supertest';
import app from './app';
describe('App', () => {
it('should reach /', () =>
supertest(app)
.get('/')
.expect('Content-Type', /json/)
.expect(200));
});
```
jest config:
```
"jest": {
"setupFilesAfterEnv": [
"/../jest.setup.ts"
],
"moduleNameMapper": {
"^@airbus/lib-transfo-utils/(.+)$": "@airbus/lib-transfo-utils/dist/$1/index.js"
},
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".spec.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"testEnvironment": "node",
"coverageDirectory": "../coverage",
"coveragePathIgnorePatterns": [
"/node_modules/"
],
"collectCoverage": true,
"coverageThreshold": {
"global": {
"branches": 90,
"lines": 90,
"statements": 90,
"functions": 90
},
"**/*.ts": {
"branches": 50,
"lines": 50,
"statements": 50,
"functions": 80
}
}
}
```
Do anyone as any idea on root cause and how to fix ?
Contributor guide
Assessment
This issue has not been assessed yet.