Skip to content

Instantly share code, notes, and snippets.

@bouzuya
Created April 1, 2014 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bouzuya/9912504 to your computer and use it in GitHub Desktop.
Save bouzuya/9912504 to your computer and use it in GitHub Desktop.
var expect = require('chai').expect;
var request = require('supertest');
var express = require('express');
describe('nested express', function() {
it('works', function(done) {
// routes
var routes = express();
routes.get('/', function(req, res) {
res.send('Hello');
});
// app
var app = express();
app.use(routes);
// GET /
request(app).get('/').expect('Hello', done);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment