multi-router.js
This file
Path
test/acceptance/multi-router.js
44 lines · 1.1 KiB · JavaScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 2027b87 point at it.
fix(deps): cookie@0.7.0Josh Bukerbefore adoption2027b87
lines 1–44why, one step back1var app = require('../../examples/multi-router')2var request = require('supertest')34describe('multi-router', function(){5 describe('GET /',function(){6 it('should respond with root handler', function(done){7 request(app)8 .get('/')9 .expect(200, 'Hello from root route.', done)10 })11 })1213 describe('GET /api/v1/',function(){14 it('should respond with APIv1 root handler', function(done){15 request(app)16 .get('/api/v1/')17 .expect(200, 'Hello from APIv1 root route.', done)18 })19 })2021 describe('GET /api/v1/users',function(){22 it('should respond with users from APIv1', function(done){23 request(app)24 .get('/api/v1/users')25 .expect(200, 'List of APIv1 users.', done)26 })27 })2829 describe('GET /api/v2/',function(){30 it('should respond with APIv2 root handler', function(done){31 request(app)32 .get('/api/v2/')33 .expect(200, 'Hello from APIv2 root route.', done)34 })35 })3637 describe('GET /api/v2/users',function(){38 it('should respond with users from APIv2', function(done){39 request(app)40 .get('/api/v2/users')41 .expect(200, 'List of APIv2 users.', done)42 })43 })44})