Comments (8)
Oh, supertest is 0.0.1
from supertest.
but also fails with supertest 0.1.0
from supertest.
0.4.x will be left in the dust reasonably soon by everyone I would imagine, 3.x isn't even relased yet so I have no intention of supporting 0.4.x
from supertest.
wait a second, I'm talking about supertest
not supporting a released express
version (2.4.3 or 2.5.1)
If you want this has nothing to do with node-0.4 (except in the part where I would prefer NOT to upgrade express).
If it is intentional to support only express-3.0.0 you write it so in big letters somewhere, or even throw an exception when an older version of an express object is passed to you (dunno how easy would the latter be).
But are you sure you want to restrict the testing capability of such nice tool ?
from supertest.
im fine with supporting it but I dont want to personally maintain it. It should work though, express 2x was an http.Server like any other and supertest works fine with regular http.Server's
from supertest.
I think I was getting my failures with node-0.8, will try with node-0.6
from supertest.
@strk i'm also having similar problems with express 2.5.x.
The way i solved them is by asserting against the Response object passed to the callback on .end()
request(app)
.get('/')
.end( function (err, response) {
if (err) throw err;
assert.equal(response.statusCode, 200);
});
However this does not work for PUT/POST request because .send() doesn't seem to work (request.body is undefined)
from supertest.
I'm using Express 2.5.9 and using supertest regularly works fine for me, FWIW! (Edit: on Node 0.6.)
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.