Files
cnpmcore/test/.setup.ts
fengmk2 4427a4fca5 feat: use egg v4 (#747)
BREAKING CHANGE: only support egg >= 4.0.0

the first app on egg v4

https://github.com/eggjs/egg/issues/3644
2025-02-09 15:43:24 +08:00

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();
});