File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -615,15 +615,30 @@ if (global.nativeLoggingHook) {
615
615
} ) ;
616
616
}
617
617
} else if ( ! global . console ) {
618
- const log = global . print || function consoleLoggingStub ( ) { } ;
618
+ function stub ( ) { }
619
+ const log = global . print || stub ;
620
+
619
621
global . console = {
622
+ debug : log ,
620
623
error : log ,
621
624
info : log ,
622
625
log : log ,
623
- warn : log ,
624
626
trace : log ,
625
- debug : log ,
626
- table : log ,
627
+ warn : log ,
628
+ assert ( expression , label ) {
629
+ if ( ! expression ) {
630
+ log ( 'Assertion failed: ' + label ) ;
631
+ }
632
+ } ,
633
+ clear : stub ,
634
+ dir : stub ,
635
+ dirxml : stub ,
636
+ group : stub ,
637
+ groupCollapsed : stub ,
638
+ groupEnd : stub ,
639
+ profile : stub ,
640
+ profileEnd : stub ,
641
+ table : stub ,
627
642
} ;
628
643
629
644
Object . defineProperty ( console , '_isPolyfilled' , {
You can’t perform that action at this time.
0 commit comments