@@ -35,7 +35,10 @@ import {
3535import { Component , ComponentType } from '@firebase/component' ;
3636import { FirebaseAppCheckInternal } from '@firebase/app-check-interop-types' ;
3737import { captureError , flush , getTelemetry } from './api' ;
38- import { LOG_ENTRY_ATTRIBUTE_KEYS , TELEMETRY_SESSION_ID_KEY } from './constants' ;
38+ import {
39+ LOG_ENTRY_ATTRIBUTE_KEYS ,
40+ TELEMETRY_SESSION_ID_KEY
41+ } from './constants' ;
3942import { TelemetryService } from './service' ;
4043import { registerTelemetry } from './register' ;
4144import { _FirebaseInstallationsInternal } from '@firebase/installations' ;
@@ -296,16 +299,16 @@ describe('Top level API', () => {
296299
297300 expect ( emittedLogs . length ) . to . equal ( 1 ) ;
298301 const log = emittedLogs [ 0 ] ;
299- expect ( log . attributes ! [ LOG_ENTRY_ATTRIBUTE_KEYS . SESSION_ID ] ) . to . equal ( 'new-session-id' ) ;
300- expect ( storage [ TELEMETRY_SESSION_ID_KEY ] ) . to . equal (
302+ expect ( log . attributes ! [ LOG_ENTRY_ATTRIBUTE_KEYS . SESSION_ID ] ) . to . equal (
301303 'new-session-id'
302304 ) ;
305+ expect ( storage [ TELEMETRY_SESSION_ID_KEY ] ) . to . equal ( 'new-session-id' ) ;
303306 } ) ;
304307
305308 it ( 'should retrieve existing session ID from sessionStorage' , ( ) => {
306309 const sessionStorageMock = {
307310 getItem : ( ) => 'existing-session-id' ,
308- setItem : ( ) => { }
311+ setItem : ( ) => { }
309312 } ;
310313 const cryptoMock = {
311314 randomUUID : ( ) => 'new-session-id'
@@ -324,15 +327,17 @@ describe('Top level API', () => {
324327
325328 expect ( emittedLogs . length ) . to . equal ( 1 ) ;
326329 const log = emittedLogs [ 0 ] ;
327- expect ( log . attributes ! [ LOG_ENTRY_ATTRIBUTE_KEYS . SESSION_ID ] ) . to . equal ( 'existing-session-id' ) ;
330+ expect ( log . attributes ! [ LOG_ENTRY_ATTRIBUTE_KEYS . SESSION_ID ] ) . to . equal (
331+ 'existing-session-id'
332+ ) ;
328333 } ) ;
329334
330335 it ( 'should handle errors when accessing sessionStorage' , ( ) => {
331336 const sessionStorageMock = {
332337 getItem : ( ) => {
333338 throw new Error ( 'SecurityError' ) ;
334339 } ,
335- setItem : ( ) => { }
340+ setItem : ( ) => { }
336341 } ;
337342
338343 Object . defineProperty ( global , 'sessionStorage' , {
@@ -344,7 +349,8 @@ describe('Top level API', () => {
344349
345350 expect ( emittedLogs . length ) . to . equal ( 1 ) ;
346351 const log = emittedLogs [ 0 ] ;
347- expect ( log . attributes ! [ LOG_ENTRY_ATTRIBUTE_KEYS . SESSION_ID ] ) . to . be . undefined ;
352+ expect ( log . attributes ! [ LOG_ENTRY_ATTRIBUTE_KEYS . SESSION_ID ] ) . to . be
353+ . undefined ;
348354 } ) ;
349355 } ) ;
350356 } ) ;
0 commit comments