@@ -42,7 +42,6 @@ import { _FirebaseInstallationsInternal } from '@firebase/installations';
4242const PROJECT_ID = 'my-project' ;
4343const APP_ID = 'my-appid' ;
4444const API_KEY = 'my-api-key' ;
45- const FID = 'fid-1234' ;
4645
4746const emittedLogs : LogRecord [ ] = [ ] ;
4847
@@ -70,8 +69,7 @@ const fakeTelemetry: Telemetry = {
7069 appId : APP_ID
7170 }
7271 } ,
73- loggerProvider : fakeLoggerProvider ,
74- fid : FID
72+ loggerProvider : fakeLoggerProvider
7573} ;
7674
7775describe ( 'Top level API' , ( ) => {
@@ -127,7 +125,6 @@ describe('Top level API', () => {
127125 expect ( log . severityNumber ) . to . equal ( SeverityNumber . ERROR ) ;
128126 expect ( log . body ) . to . equal ( 'This is a test error' ) ;
129127 expect ( log . attributes ) . to . deep . equal ( {
130- 'user.id' : FID ,
131128 'error.type' : 'TestError' ,
132129 'error.stack' : '...stack trace...'
133130 } ) ;
@@ -144,7 +141,6 @@ describe('Top level API', () => {
144141 expect ( log . severityNumber ) . to . equal ( SeverityNumber . ERROR ) ;
145142 expect ( log . body ) . to . equal ( 'error with no stack' ) ;
146143 expect ( log . attributes ) . to . deep . equal ( {
147- 'user.id' : FID ,
148144 'error.type' : 'Error' ,
149145 'error.stack' : 'No stack trace available'
150146 } ) ;
@@ -157,9 +153,7 @@ describe('Top level API', () => {
157153 const log = emittedLogs [ 0 ] ;
158154 expect ( log . severityNumber ) . to . equal ( SeverityNumber . ERROR ) ;
159155 expect ( log . body ) . to . equal ( 'a string error' ) ;
160- expect ( log . attributes ) . to . deep . equal ( {
161- 'user.id' : 'fid-1234'
162- } ) ;
156+ expect ( log . attributes ) . to . deep . equal ( { } ) ;
163157 } ) ;
164158
165159 it ( 'should capture an unknown error type correctly' , ( ) => {
@@ -169,9 +163,7 @@ describe('Top level API', () => {
169163 const log = emittedLogs [ 0 ] ;
170164 expect ( log . severityNumber ) . to . equal ( SeverityNumber . ERROR ) ;
171165 expect ( log . body ) . to . equal ( 'Unknown error type: number' ) ;
172- expect ( log . attributes ) . to . deep . equal ( {
173- 'user.id' : 'fid-1234'
174- } ) ;
166+ expect ( log . attributes ) . to . deep . equal ( { } ) ;
175167 } ) ;
176168
177169 it ( 'should propagate trace context' , async ( ) => {
@@ -195,7 +187,6 @@ describe('Top level API', () => {
195187 await provider . shutdown ( ) ;
196188
197189 expect ( emittedLogs [ 0 ] . attributes ) . to . deep . equal ( {
198- 'user.id' : FID ,
199190 'error.type' : 'TestError' ,
200191 'error.stack' : '...stack trace...' ,
201192 'logging.googleapis.com/trace' : `projects/${ PROJECT_ID } /traces/my-trace` ,
@@ -220,7 +211,6 @@ describe('Top level API', () => {
220211 expect ( emittedLogs . length ) . to . equal ( 1 ) ;
221212 const log = emittedLogs [ 0 ] ;
222213 expect ( log . attributes ) . to . deep . equal ( {
223- 'user.id' : FID ,
224214 'error.type' : 'TestError' ,
225215 'error.stack' : '...stack trace...' ,
226216 strAttr : 'string attribute' ,
@@ -254,7 +244,7 @@ function getFakeApp(): FirebaseApp {
254244 'installations-internal' ,
255245 ( ) =>
256246 ( {
257- getId : async ( ) => 'FID ' ,
247+ getId : async ( ) => 'iid ' ,
258248 getToken : async ( ) => 'authToken'
259249 } as _FirebaseInstallationsInternal ) ,
260250 ComponentType . PUBLIC
0 commit comments