Top "Proxyquire" questions

Questions regarding proxyquire - Proxies nodejs's require to make overriding dependencies during testing

How to mock middleware in Express to skip authentication for unit test?

I have the following in Express //index.js var service = require('./subscription.service'); var auth = require('../auth/auth.…

node.js express mocha sinon proxyquire
Proxyquire, rewire, SandboxedModule, and Sinon: pros & cons

When mocking Node dependencies, I've happened upon the following libraries: Proxyquire Rewire SandboxedModule Sinon They all seem to do more-or-less …

node.js mocking sinon proxyquire
Stubbing with proxyquire

How would I stub the following module with proxyquire and sinon: var email = require("emailjs").server.connect.send(); I did …

node.js unit-testing proxyquire
How can I mock a fake database for when unit testing against Knex?

I've been using Knex successfully to connect to a backend database. But I want to be able to unit test …

javascript node.js unit-testing knex.js proxyquire