diff --git a/index.d.ts b/index.d.ts index 9b77db4752..247ef6e942 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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[]; diff --git a/test/agent.test.js b/test/agent.test.js index d4b006dc64..aea3ee98b8 100644 --- a/test/agent.test.js +++ b/test/agent.test.js @@ -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); @@ -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')); }); });