supertest icon indicating copy to clipboard operation
supertest copied to clipboard

🕷 Super-agent driven library for testing node.js HTTP servers using a fluent API. Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.

Results 149 supertest issues
Sort by recently updated
recently updated
newest added

When I want to pipe to the request : ```javascript const body = Readable.from(JSON.stringify({ name: 'john' })); const req = request(app) .post('/') .set('Content-Type', 'application/json') .on('response', function (res) { should.exist(res); res.status.should.be.equal(200);...

### I am using chai and mocha using request package for testing APIs ``` var expect = require('chai').expect; var request = require('request'); const HypersignAuthToken = 'auth_token_value'; const projectData = {...

This pull request solve this issue: https://github.com/visionmedia/supertest/issues/631

In my Mocha tests I use `before()` hooks to send a number of requests to create data required for the actual tests. When one of the requests fails I end...

need-help

I didn't realize until after using this library for a few days that `supertest.Test` (the return value for `.get`, `.expect` etc) extends `Promise` after a few generations of inheritance. This...

Hi there! 👋 I am attempting to write an integration test case with supertest in which a couple requests are sent to the app concurrently. However, I get an `ECONNREFUSED`...

Hello everyone and thank you for reading. I'm testing an API (Internal) that calls another API (external), and processes the results. When I test methods that don't use the external,...

I am running the Jasmine Test Explorer in VSC with SuperTest 6.1.3. When I run this test it passes, even though internally it seems to know it should not. ```ts...

When I await a supertest request inside an async function, the server is not closed (like in `.end()`) so I have to do this manually. Is this known? How can...

need-help

I am trying to run the first example. ```js const request = require('supertest'); const express = require('express'); const app = express(); app.get('/user', function(req, res) { res.status(200).json({ name: 'john' }); });...