BREAKING CHANGE: only support egg >= 4.0.0 the first app on egg v4 https://github.com/eggjs/egg/issues/3644
14 lines
341 B
TypeScript
14 lines
341 B
TypeScript
import { mock } from '@eggjs/mock/bootstrap';
|
|
import { TestUtil } from './TestUtil';
|
|
|
|
beforeEach(async () => {
|
|
// don't show console log on unittest by default
|
|
TestUtil.app.loggers.disableConsole();
|
|
await TestUtil.app.redis.flushdb('sync');
|
|
});
|
|
|
|
afterEach(async () => {
|
|
await TestUtil.truncateDatabase();
|
|
await mock.restore();
|
|
});
|