You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to understand how to use mock-kue. The README says just require it. But I only want to use it during testing. Do I put an if statement around it or what? Or does mock-kue realize its running in a test environment and it doesnt look like it overrides the createQueue function. CreateQueue requires redis to be running on the PC. Is this expected.
The text was updated successfully, but these errors were encountered:
// test.js
const pc = require('./production-code');
require('mock-kue'); // it must be placed before calling `createJob`
pc.createJob(); // will not enqueue any job because of `mock-kue`
Trying to understand how to use mock-kue. The README says just require it. But I only want to use it during testing. Do I put an if statement around it or what? Or does mock-kue realize its running in a test environment and it doesnt look like it overrides the createQueue function. CreateQueue requires redis to be running on the PC. Is this expected.
The text was updated successfully, but these errors were encountered: