Comments (4)
I examined deeper, and I got that it is find if I pass http server instead of express app.
server = http.createServer(app) # or server = app.listen 3456
req = (supertest server)['get'] '/users'
I think it is better to deal this problem or to add some notice.
from supertest.
it shouldn't matter if it's http or express as long as it's not already listening, also best not to post coffeescript, like req = (supertest server)['get'] '/users'
makes no sense to me haha supertest(server).get('/users')
looks a million times better
from supertest.
I have this problem too, is there some kind of workaround? Why does supertest needs to open a port per request(app).*? I would think there is only one port needed.
from supertest.
Just pass in a server that is already listening.
from supertest.
Related Issues (20)
- Notice regarding the move from @visionmedia org to @ladjs org
- Cookies go to domains they didn't return from
- disabling the debug REQURL CODE line that comes while testing HOT 1
- HTTP2 sample no working
- [fix] TypeError: Cannot read properties of undefined (reading 'address') HOT 1
- cookiejar Regular Expression Denial of Service via Cookie.parse function HOT 3
- `_body` key instead of `body` in response HOT 1
- Its is a good practice for Next.js?
- [fix] timeout doesn't call end with error
- [fix] Module not found: Error: Can't resolve 'http' in '[...]/node_modules/supertest/lib' HOT 1
- [fix] Do no replace invalid body with an empty JSON object HOT 1
- I didnt find supertest latest version updated with latest superagent 8.0.9 HOT 3
- Why I was getting "Jest has detected the following 1 open handle potentially keeping Jest from exiting: Timeout"
- Error: write EPIPE on large files - Next.js + Jest + Supertest HOT 1
- [fix] Cannot send secure cookie over unencrypted connection
- [fix] Next.js: Ubuntu 22.04.3 LTS
- [fix] don't change the requrest url hash HOT 1
- SuperTest is not compatible with Node v18.19.0 Error: ECONNREFUSED: Connection Refused HOT 3
- [fix] write EPIPE error when attaching a file. (small repro)
- supertest version 6.3.3 => 6.3.4 is a breaking change HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supertest.