koa-lite/test/application/inspect.js

22 lines
482 B
JavaScript
Raw Permalink Normal View History

'use strict';
const assert = require('assert');
const util = require('util');
2015-10-13 06:19:42 +00:00
const Koa = require('../..');
const app = new Koa();
describe('app.inspect()', () => {
it('should work', () => {
const str = util.inspect(app);
assert.equal("{ subdomainOffset: 2, proxy: false, env: 'test' }", str);
2015-10-12 20:36:41 +00:00
});
it('should return a json representation', () => {
assert.deepEqual(
{ subdomainOffset: 2, proxy: false, env: 'test' },
app.inspect()
);
});
2015-10-12 20:36:41 +00:00
});