Skip to content

Commit

Permalink
fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Abinet18 committed Sep 22, 2023
1 parent dca9001 commit 77b1d7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkgs/instrumentations/web/page-view/src/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export class PageViewEventInstrumentation extends InstrumentationBase<unknown> {
*/
constructor(config: PageViewInstrumentationConfig) {
super(PageViewEventInstrumentation.instrumentationName, VERSION, config);
this.emitter =events.getEventEmitter(
this.emitter = events.getEventEmitter(
PageViewEventInstrumentation.name,
VERSION,
'browser'
'browser',
VERSION
);
this.applyCustomEventData = config.applyCustomEventData;
this._patchHistoryApi();
Expand Down
6 changes: 2 additions & 4 deletions pkgs/instrumentations/web/page-view/test/pageView.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ import {
SimpleLogRecordProcessor,
ReadableLogRecord,
} from '@opentelemetry/sandbox-sdk-logs';
import {
EventEmitterProvider
} from '@opentelemetry/sandbox-sdk-events';
import { EventEmitterProvider } from '@opentelemetry/sandbox-sdk-events';
import * as assert from 'assert';
import * as sinon from 'sinon';
import { PageViewEventInstrumentation } from '../src';
Expand All @@ -43,7 +41,7 @@ describe('PageView Instrumentation', () => {
const eventEmitterProvider = new EventEmitterProvider();
events.setGlobalEventEmitterProvider(eventEmitterProvider);

afterEach(async () => {
afterEach(() => {
exporter.reset();
sandbox.restore();
plugin.disable();
Expand Down

0 comments on commit 77b1d7d

Please sign in to comment.