mirror of
https://github.com/eggjs/egg.git
synced 2024-12-04 07:14:30 +00:00
Refs: https://github.com/eggjs/egg/issues/3454 Fixes: https://github.com/eggjs/egg/issues/3548
23 lines
549 B
JavaScript
23 lines
549 B
JavaScript
'use strict';
|
|
|
|
const assert = require('assert');
|
|
const mock = require('egg-mock');
|
|
const path = require('path');
|
|
const utils = require('./utils');
|
|
|
|
describe('test/agent.test.js', () => {
|
|
afterEach(mock.restore);
|
|
let app;
|
|
|
|
before(() => {
|
|
app = utils.app('apps/agent-logger-config');
|
|
return app.ready();
|
|
});
|
|
after(() => app.close());
|
|
|
|
it('agent logger config should work', () => {
|
|
const fileTransport = app._agent.logger.get('file');
|
|
assert(fileTransport.options.file === path.join('/tmp/foo', 'egg-agent.log'));
|
|
});
|
|
});
|