File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { expect } from 'chai' ;
19
- import { spy as Spy } from 'sinon' ;
19
+ import { spy as Spy , SinonSpy } from 'sinon' ;
20
20
import { Logger , LogLevel } from '../src/logger' ;
21
21
import { setLogLevel } from '../index' ;
22
22
import { debug } from 'util' ;
23
23
24
24
describe ( '@firebase/logger' , ( ) => {
25
25
const message = 'Hello there!' ;
26
26
let client : Logger ;
27
- const spies = {
27
+ const spies : { [ key : string ] : SinonSpy | null } = {
28
28
logSpy : null ,
29
29
infoSpy : null ,
30
30
warnSpy : null ,
@@ -44,10 +44,10 @@ describe('@firebase/logger', () => {
44
44
} ) ;
45
45
46
46
afterEach ( ( ) => {
47
- spies . logSpy . restore ( ) ;
48
- spies . infoSpy . restore ( ) ;
49
- spies . warnSpy . restore ( ) ;
50
- spies . errorSpy . restore ( ) ;
47
+ spies . logSpy && spies . logSpy . restore ( ) ;
48
+ spies . infoSpy && spies . infoSpy . restore ( ) ;
49
+ spies . warnSpy && spies . warnSpy . restore ( ) ;
50
+ spies . errorSpy && spies . errorSpy . restore ( ) ;
51
51
} ) ;
52
52
53
53
function testLog ( message , channel , shouldLog ) {
You can’t perform that action at this time.
0 commit comments