14
14
* limitations under the License.
15
15
*/
16
16
17
- import { expect } from " chai" ;
18
- import { spy as Spy } from " sinon" ;
19
- import { Logger , LogLevel } from " ../src/logger" ;
20
- import { setLogLevel } from " ../index" ;
21
- import { debug } from " util" ;
17
+ import { expect } from ' chai' ;
18
+ import { spy as Spy } from ' sinon' ;
19
+ import { Logger , LogLevel } from ' ../src/logger' ;
20
+ import { setLogLevel } from ' ../index' ;
21
+ import { debug } from ' util' ;
22
22
23
23
describe ( '@firebase/logger' , ( ) => {
24
- const message = 'Hello there!' ;
24
+ const message = 'Hello there!' ;
25
25
let client : Logger ;
26
26
const spies = {
27
27
debugSpy : null ,
28
28
logSpy : null ,
29
29
infoSpy : null ,
30
30
warnSpy : null ,
31
31
errorSpy : null
32
- }
32
+ } ;
33
33
/**
34
34
* Before each test, instantiate a new instance of Logger and set the log
35
- * level so that all
36
- *
35
+ * level so that all
36
+ *
37
37
* Also spy on all of the console methods so we can assert against them as
38
38
* needed
39
39
*/
@@ -56,12 +56,14 @@ describe('@firebase/logger', () => {
56
56
} ) ;
57
57
58
58
function testLog ( message , channel , shouldLog ) {
59
- it ( `Should ${ shouldLog ? '' : 'not' } call \`console.${ channel } \` if \`.${ channel } \` is called` , ( ) => {
59
+ it ( `Should ${ shouldLog ? '' : 'not' } call \`console.${ channel } \` if \`.${
60
+ channel
61
+ } \` is called`, ( ) => {
60
62
client [ channel ] ( message ) ;
61
63
expect (
62
- spies [ `${ channel } Spy` ] && spies [ `${ channel } Spy` ] . called ,
64
+ spies [ `${ channel } Spy` ] && spies [ `${ channel } Spy` ] . called ,
63
65
`Expected ${ channel } to ${ shouldLog ? '' : 'not' } log`
64
- ) . to . be [ shouldLog ? 'true' : 'false' ] ;
66
+ ) . to . be [ shouldLog ? 'true' : 'false' ] ;
65
67
} ) ;
66
68
}
67
69
0 commit comments