Skip to content

Instantly share code, notes, and snippets.

@makefunstuff
Created February 26, 2017 06:32
Show Gist options
  • Save makefunstuff/30290648e412a496c1dd490f6c7cc187 to your computer and use it in GitHub Desktop.
Save makefunstuff/30290648e412a496c1dd490f6c7cc187 to your computer and use it in GitHub Desktop.
const middleware = require('../middlewares/my-middweware');
const next = sinon.spy();
const req = {};
const res = {};
describe('test my middleware', () => {
it('tests input and output', () => {
middleware(req, res, next);
expect(next).to.have.been.called;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment