Skip to content

Instantly share code, notes, and snippets.

@Enome
Created August 9, 2012 14:58
Show Gist options
  • Save Enome/3304930 to your computer and use it in GitHub Desktop.
Save Enome/3304930 to your computer and use it in GitHub Desktop.
var app = express();
var fake = function (req, res, next) {
req.user = {};
next();
}
var middleware_under_test = function (req, res, next) {
// do stuff
}
app.use(fake);
app.get('/', middleware_under_test);
supertest(app);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment