File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class Logger {
42
42
this . level = INFO ;
43
43
44
44
if ( silent ) {
45
- this . level = WARN ;
45
+ this . level = FATAL + 10 ;
46
46
}
47
47
48
48
if ( this . _debug ) {
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ describe('hexo-log', () => {
281
281
spy . args [ 0 ] [ 0 ] . should . contain ( now . toISOString ( ) . substring ( 11 , 23 ) ) ;
282
282
} ) ;
283
283
284
- it ( 'options.silent - should ignore those level lower than warn ' , ( ) => {
284
+ it ( 'options.silent - should not display anything ' , ( ) => {
285
285
const consoleTraceSpy = sinon . spy ( ) ;
286
286
const consoleDebugSpy = sinon . spy ( ) ;
287
287
const consoleInfoSpy = sinon . spy ( ) ;
@@ -307,8 +307,8 @@ describe('hexo-log', () => {
307
307
consoleTraceSpy . called . should . be . false ;
308
308
consoleDebugSpy . called . should . be . false ;
309
309
consoleInfoSpy . called . should . be . false ;
310
- consoleWarnSpy . calledOnce . should . be . true ;
311
- consoleErrorSpy . calledTwice . should . be . true ;
310
+ consoleWarnSpy . calledOnce . should . be . false ;
311
+ consoleErrorSpy . calledTwice . should . be . false ;
312
312
} ) ;
313
313
} ) ;
314
314
You can’t perform that action at this time.
0 commit comments