Skip to content

Commit c0d4cfa

Browse files
committed
remove extra/unneeded changes
1 parent ac4de92 commit c0d4cfa

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

packages/replay-internal/test/integration/session.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ describe('Integration | session', () => {
357357

358358
await vi.runAllTimersAsync();
359359

360-
expect(replay.session.id).not.toBe(initialSession.id);
360+
expect(replay).not.toHaveSameSession(initialSession);
361361
expect(replay).not.toHaveLastSentReplay();
362362
expect(replay['_stopRecording']).toBeDefined();
363363

packages/replay-internal/test/mocks/mockSdk.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { Replay as ReplayIntegration } from '../../src/integration';
55
import type { ReplayContainer } from '../../src/replay';
66
import type { ReplayConfiguration } from '../../src/types';
77
import type { TestClientOptions } from '../utils/TestClient';
8-
import { BASE_TIMESTAMP } from './../index';
98
import { getDefaultClientOptions, init } from '../utils/TestClient';
109

1110
export interface MockSdkParams {
@@ -52,7 +51,6 @@ export async function mockSdk({ replayOptions, sentryOptions, autoStart = true }
5251
}> {
5352
const { Replay } = await import('../../src/integration');
5453

55-
vi.setSystemTime(new Date(BASE_TIMESTAMP));
5654
// Scope this to the test, instead of the module
5755
let _initialized = false;
5856
class TestReplayIntegration extends Replay {

packages/replay-internal/test/mocks/resetSdkMock.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export async function resetSdkMock({ replayOptions, sentryOptions, autoStart }:
3939

4040
// XXX: This is needed to ensure `domHandler` is set
4141
await vi.runAllTimersAsync();
42-
// vi.runAllTimers();
43-
// await new Promise(process.nextTick);
4442
vi.setSystemTime(new Date(BASE_TIMESTAMP));
4543

4644
return {

packages/replay-internal/test/unit/coreHandlers/util/xhrUtils.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ describe('Unit | coreHandlers | util | xhrUtils', () => {
99

1010
it('works with a Document', () => {
1111
const doc = document.implementation.createHTMLDocument();
12-
doc.body.innerHTML = '<div>abc</div>';
12+
const bodyEl = document.createElement('body');
13+
bodyEl.innerHTML = '<div>abc</div>';
14+
doc.body = bodyEl;
1315

1416
const actual = _parseXhrResponse(doc, '');
1517
expect(actual).toEqual(['<body><div>abc</div></body>']);

packages/replay-internal/test/unit/util/handleRecordingEmit.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { vi } from 'vitest';
2+
import type { MockInstance } from 'vitest';
3+
14
import { EventType } from '@sentry-internal/rrweb';
25

36
import { BASE_TIMESTAMP } from '../..';

0 commit comments

Comments
 (0)