forwardemail / forwardemail/supertest
[fix] Module not found: Error: Can't resolve 'http' in '[...]/node_modules/supertest/lib'
- Dominant language
- JavaScript
- Stars
- 14.4k
- Forks
- 782
- PR merge metrics
- No merged PRs in 30d
Description
## This error occurs when running `ng test` (Angular/Karma/Jasmine)
**Node.js version:** v18.13.0se
**OS version:** Ubuntu 22.04.2 LTS
**Description:** Module not found: Error: Can't resolve 'http' in '[...]/node_modules/supertest/lib'
## Actual behavior
`ng test` crashes and doesn't run
## Expected behavior
`ng test` runs
## Code to reproduce
```
it("webmaster's email address", async done => {
const response = await request.get('/test')
expect(response.status).toBe(200)
expect(response.body.message).toBe('pass!')
done()
})
```
## Checklist
- [X] I have searched through GitHub issues for similar issues.
- [ ] I have completely read through the README and documentation.
- [ ] I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
Contributor guide
Assessment
This issue has not been assessed yet.