Skip to content

Commit

Permalink
fix tests , fix enable and disable to act on patching history api
Browse files Browse the repository at this point in the history
  • Loading branch information
Abinet18 committed Sep 29, 2023
1 parent 44167a0 commit cc1d345
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkgs/instrumentations/web/page-view/test/pageView.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { logs } from '@opentelemetry/sandbox-api-logs';
import { events } from '@opentelemetry/sandbox-api-events';
import { PageTypes } from '../src/enums/PageTypes';


describe('PageView Instrumentation', () => {
let plugin: PageViewEventInstrumentation;
const sandbox = sinon.createSandbox();
Expand All @@ -42,7 +43,9 @@ describe('PageView Instrumentation', () => {
events.setGlobalEventEmitterProvider(eventEmitterProvider);

afterEach(() => {

Check failure on line 45 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-windows-tests (18)

Unexpected console statement

Check failure on line 45 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-windows-tests (18)

Unexpected console statement

Check failure on line 45 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-tests (14)

Unexpected console statement

Check failure on line 45 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-tests (16)

Unexpected console statement

Check failure on line 45 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-tests (18)

Unexpected console statement
console.log("Running afterEach");
exporter.reset();

Check failure on line 47 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-windows-tests (18)

Unexpected console statement

Check failure on line 47 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-windows-tests (18)

Unexpected console statement

Check failure on line 47 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-tests (14)

Unexpected console statement

Check failure on line 47 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-tests (16)

Unexpected console statement

Check failure on line 47 in pkgs/instrumentations/web/page-view/test/pageView.test.ts

View workflow job for this annotation

GitHub Actions / node-tests (18)

Unexpected console statement
console.log("Records after reset: ", exporter.getFinishedLogRecords());
plugin.disable();
});

Expand Down Expand Up @@ -105,7 +108,6 @@ describe('PageView Instrumentation', () => {
});

history.pushState({}, '', '/dummy1.html');

assert.strictEqual(exporter.getFinishedLogRecords().length, 1);

const pageViewLogRecord =
Expand Down Expand Up @@ -234,7 +236,6 @@ describe('PageView Instrumentation', () => {
(<Attributes>pageViewLogRecord2.attributes['event.data'])['referrer'],
secondReferrer
);

done();
});
});
Expand Down

0 comments on commit cc1d345

Please sign in to comment.