mirror of
https://github.com/eggjs/egg.git
synced 2024-12-04 07:14:30 +00:00
Show who define the property of the config Closes https://github.com/eggjs/egg/issues/1132
27 lines
543 B
JavaScript
27 lines
543 B
JavaScript
'use strict';
|
|
|
|
const pedding = require('pedding');
|
|
const utils = require('../../../utils');
|
|
|
|
describe('test/lib/core/loader/load_router.test.js', () => {
|
|
let app;
|
|
before(() => {
|
|
app = utils.app('apps/app-router');
|
|
return app.ready();
|
|
});
|
|
after(() => app.close());
|
|
|
|
it('should load app/router.js', done => {
|
|
done = pedding(2, done);
|
|
app.httpRequest()
|
|
.get('/')
|
|
.expect(200)
|
|
.expect('hello', done);
|
|
|
|
app.httpRequest()
|
|
.get('/home')
|
|
.expect(200)
|
|
.expect('hello', done);
|
|
});
|
|
});
|