Skip to content

Commit 4377815

Browse files
committed
Fix tests
1 parent 31ebe3f commit 4377815

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/telemetry/src/api.test.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import { _FirebaseInstallationsInternal } from '@firebase/installations';
4242
const PROJECT_ID = 'my-project';
4343
const APP_ID = 'my-appid';
4444
const API_KEY = 'my-api-key';
45-
const FID = 'fid-1234';
4645

4746
const 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

7775
describe('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
'app.version': 'unset'
@@ -145,7 +142,6 @@ describe('Top level API', () => {
145142
expect(log.severityNumber).to.equal(SeverityNumber.ERROR);
146143
expect(log.body).to.equal('error with no stack');
147144
expect(log.attributes).to.deep.equal({
148-
'user.id': FID,
149145
'error.type': 'Error',
150146
'error.stack': 'No stack trace available',
151147
'app.version': 'unset'
@@ -197,7 +193,6 @@ describe('Top level API', () => {
197193
await provider.shutdown();
198194

199195
expect(emittedLogs[0].attributes).to.deep.equal({
200-
'user.id': FID,
201196
'error.type': 'TestError',
202197
'error.stack': '...stack trace...',
203198
'app.version': 'unset',
@@ -223,7 +218,6 @@ describe('Top level API', () => {
223218
expect(emittedLogs.length).to.equal(1);
224219
const log = emittedLogs[0];
225220
expect(log.attributes).to.deep.equal({
226-
'user.id': FID,
227221
'error.type': 'TestError',
228222
'error.stack': '...stack trace...',
229223
'app.version': 'unset',
@@ -275,10 +269,17 @@ function getFakeApp(): FirebaseApp {
275269
new Component(
276270
'installations-internal',
277271
() =>
272+
<<<<<<< HEAD
278273
({
279274
getId: async () => 'FID',
280275
getToken: async () => 'authToken'
281276
} as _FirebaseInstallationsInternal),
277+
=======
278+
({
279+
getId: async () => 'iid',
280+
getToken: async () => 'authToken'
281+
} as _FirebaseInstallationsInternal),
282+
>>>>>>> e66c193d1 (Fix tests)
282283
ComponentType.PUBLIC
283284
)
284285
);

packages/telemetry/src/logging/logger-provider.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { FetchTransport } from './fetch-transport';
3333
import { DynamicHeaderProvider, DynamicLogAttributeProvider } from '../types';
3434
import { FirebaseApp } from '@firebase/app';
3535
import { ExportResult } from '@opentelemetry/core';
36-
import { _FirebaseInstallationsInternal } from '@firebase/installations';
3736

3837
/**
3938
* Create a logger provider for the current execution environment.

0 commit comments

Comments
 (0)