Skip to content

Commit

Permalink
fix: export bootstrap file
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Aug 8, 2018
1 parent 0f0f9c7 commit 1337926
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/midway-mock/bootstrap.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export {
export declare const app: MockApplication;
export declare const mock: EggMock;
export declare const mm: EggMock;

13 changes: 13 additions & 0 deletions packages/midway-mock/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
'use strict';

const {
assert,
app,
mock,
mm
} = require('egg-mock/boostrap');
module.exports = require('egg-mock/bootstrap');

export {
assert,
app,
mock,
mm
};
6 changes: 3 additions & 3 deletions packages/midway-mock/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import {EggMock} from 'egg-mock';
import {mockContainer} from './container';
const mm = require('egg-mock');
const mock = require('egg-mock');

interface MidwayMock extends EggMock {
container: typeof mockContainer;
}

const mm2: MidwayMock = {
...mm,
...mock,
mockContainer
};

mm2.container = mockContainer;
module.exports = mm2;

exports.mm = mm2;
export default mm2;

0 comments on commit 1337926

Please sign in to comment.