refactor: use spyOn in mockLog

This commit is contained in:
Clark Du 2018-04-13 15:11:53 +08:00
parent 9ddd56c97f
commit 708f602a62
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -5,7 +5,7 @@ export default function mockLog(levels = 'all', logger = console) {
}
beforeAll(() => {
for (let level of levels) {
logger[level] = jest.fn()
jest.spyOn(logger, level).mockImplementation(()=>{})
}
})
beforeEach(() => {