Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
killagu committed Apr 8, 2019
1 parent a0efce7 commit 16abfd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,25 @@ declare module 'egg' {
* logger
* @member {EggLogger}
*/
logger: EggLogger;
protected logger: EggLogger;

/**
* The configuration of application
* @member {EggAppConfig}
*/
config: EggAppConfig;
protected config: EggAppConfig;

/**
* The instance of agent
* @member {Agent}
*/
agent: Agent;
protected agent: Agent;

/**
* The instance of app
* @member {Application}
*/
app: Application;
protected app: Application;
}

export type RequestArrayBody = any[];
Expand Down
5 changes: 3 additions & 2 deletions test/agent.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use strict';

const assert = require('assert');
const mock = require('egg-mock');
const path = require('path');
const utils = require('./utils');
const assert = require('assert');

describe('test/agent.test.js', () => {
afterEach(mock.restore);
Expand All @@ -16,6 +17,6 @@ describe('test/agent.test.js', () => {

it('agent logger config should work', () => {
const fileTransport = app._agent.logger.get('file');
assert(fileTransport.options.file === '/tmp/foo/egg-agent.log');
assert(fileTransport.options.file === path.join('/tmp/foo', 'egg-agent.log'));
});
});

0 comments on commit 16abfd1

Please sign in to comment.