Skip to content

Commit 54bdc4e

Browse files
committed
Fix logger test.
1 parent 263cd24 commit 54bdc4e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/logger/test/logger.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
*/
1717

1818
import { expect } from 'chai';
19-
import { spy as Spy } from 'sinon';
19+
import { spy as Spy, SinonSpy } from 'sinon';
2020
import { Logger, LogLevel } from '../src/logger';
2121
import { setLogLevel } from '../index';
2222
import { debug } from 'util';
2323

2424
describe('@firebase/logger', () => {
2525
const message = 'Hello there!';
2626
let client: Logger;
27-
const spies = {
27+
const spies: { [key: string]: SinonSpy | null } = {
2828
logSpy: null,
2929
infoSpy: null,
3030
warnSpy: null,
@@ -44,10 +44,10 @@ describe('@firebase/logger', () => {
4444
});
4545

4646
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();
5151
});
5252

5353
function testLog(message, channel, shouldLog) {

0 commit comments

Comments
 (0)