mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
refactor: support string param in mock-log
This commit is contained in:
parent
68560c6aae
commit
0583558d77
@ -2,6 +2,8 @@
|
||||
export default function mockLog(levels = 'all', logger = console) {
|
||||
if (levels === 'all') {
|
||||
levels = ['trace', 'debug', 'log', 'info', 'warn', 'error']
|
||||
} else if (typeof levels === 'string') {
|
||||
levels = [levels]
|
||||
}
|
||||
beforeAll(() => {
|
||||
for (let level of levels) {
|
||||
|
Loading…
Reference in New Issue
Block a user