2015-10-12 04:59:30 +00:00
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2017-05-11 03:30:32 +00:00
|
|
|
const assert = require('assert');
|
2015-10-13 06:19:42 +00:00
|
|
|
const Koa = require('../..');
|
2015-10-12 04:59:30 +00:00
|
|
|
|
2015-10-25 07:54:57 +00:00
|
|
|
describe('app.toJSON()', () => {
|
|
|
|
it('should work', () => {
|
2015-10-13 06:19:42 +00:00
|
|
|
const app = new Koa();
|
2015-10-12 04:59:30 +00:00
|
|
|
const obj = app.toJSON();
|
|
|
|
|
2017-05-11 03:30:32 +00:00
|
|
|
assert.deepEqual({
|
2015-10-12 04:59:30 +00:00
|
|
|
subdomainOffset: 2,
|
2015-10-29 16:51:11 +00:00
|
|
|
proxy: false,
|
2015-10-12 04:59:30 +00:00
|
|
|
env: 'test'
|
2017-05-11 03:30:32 +00:00
|
|
|
}, obj);
|
2015-10-12 20:36:41 +00:00
|
|
|
});
|
|
|
|
});
|