Top "Supertest" questions

SuperTest is a module that provides high-level abstraction for testing HTTP in node.

Reuse Supertest tests on a remote URL

I'm using MochaJS and SuperTest to test my API during development and absolutely LOVE it. However, I would like to …

node.js mocha.js supertest
Mocha Supertest json response body pattern matching issue

When I make an API call I want to inspect the returned JSON for its results. I can see the …

regex json api mocha.js supertest
Getting "Error: the string "Not a valid BCrypt hash." was thrown, throw an Error :)" during Mocha ExpressJS testing

I have a MEAN stack app that is using Passport for authentication. I'm trying to write a unit test that …

node.js express mocha.js passport.js supertest
How to avoid timeouts in mocha testcases?

Here I am attaching my code, I am passing done callback and using supertest for request. Since I am using …

node.js unit-testing mocha.js supertest
How to Test PUT method using supertest and jasmine-node

I am building an API with expressjs and my routes look like this module.exports = function(app){ var book = require(…

supertest jasmine-node
How to authenticate Supertest requests with Passport /Facebook strategy/?

I'm using Passport.js for authentication (Facebook strategy) and testing with Mocha and Supertest. How can I create a session …

node.js express mocha.js passport.js supertest
NodeJS supertest access to session object

I'm testing my Node.js application with supertest. In my controller I access the session object. In order to make …

javascript node.js session mocha.js supertest
Loopback testing with supertest, mocha and models

On the Google groups post on deprecating loopback-testing there is a question that asks about providing a proper example of …

node.js mocha loopbackjs supertest
Setting timeouts with supertest not working

I'm trying to test my server with some code like so: describe 'POST /do/some/stuff/', -> it …

node.js mocha.js supertest
How to mock a middleware in supertest?

I want to test if the middleware in app.js is called. Although I mock the module work.js, it …

node.js express jestjs supertest