mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-15 15:10:31 -08:00
fix: some console type not exist on test env
This commit is contained in:
parent
7f756df4a7
commit
75793ebb85
1 changed files with 8 additions and 1 deletions
|
|
@ -7,7 +7,14 @@ export * from './wiki-output';
|
|||
|
||||
const logger =
|
||||
process.env.NODE_ENV === 'test'
|
||||
? console
|
||||
? Object.assign(console, {
|
||||
emerg: console.error.bind(console),
|
||||
alert: console.error.bind(console),
|
||||
crit: console.error.bind(console),
|
||||
warning: console.warn.bind(console),
|
||||
notice: console.log.bind(console),
|
||||
debug: console.log.bind(console),
|
||||
})
|
||||
: winston.createLogger({
|
||||
levels: {
|
||||
emerg: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue