Skip to content

Commit 78221f5

Browse files
committed
jest 29
1 parent 6b02045 commit 78221f5

File tree

4 files changed

+233
-96
lines changed

4 files changed

+233
-96
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"rollup-plugin-cleanup": "^3.2.1",
124124
"rollup-plugin-license": "^3.3.1",
125125
"size-limit": "~11.1.0",
126-
"ts-jest": "^27.1.4",
126+
"ts-jest": "^29.0.0",
127127
"ts-node": "10.9.1",
128128
"typedoc": "^0.18.0",
129129
"typescript": "4.9.5",

packages/browser-utils/src/metrics/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SentrySpan } from '@sentry/core';
22
import { spanToJSON, startInactiveSpan, withActiveSpan } from '@sentry/core';
33
import type { Span, SpanTimeInput, StartSpanOptions } from '@sentry/types';
4-
import { WINDOW } from './types';
4+
import { WINDOW } from '../types';
55

66
/**
77
* Checks if a given value is a valid measurement value.

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ describe('Integration | errorSampleRate', () => {
928928
* sampling since we can load a saved session that did not have an error (and
929929
* thus no replay was created).
930930
*/
931-
it('sends a replay after loading the session from storage', async () => {
931+
it.only('sends a replay after loading the session from storage', async () => {
932932
// Pretend that a session is already saved before loading replay
933933
WINDOW.sessionStorage.setItem(
934934
REPLAY_SESSION_KEY,
@@ -946,6 +946,8 @@ describe('Integration | errorSampleRate', () => {
946946
integration['_initialize']();
947947
const optionsEvent = createOptionsEvent(replay);
948948

949+
await vi.runAllTimersAsync();
950+
949951
const TEST_EVENT = getTestEventIncremental({ timestamp: BASE_TIMESTAMP });
950952
mockRecord._emitter(TEST_EVENT);
951953

@@ -957,6 +959,8 @@ describe('Integration | errorSampleRate', () => {
957959
await vi.advanceTimersToNextTimerAsync();
958960
await vi.advanceTimersToNextTimerAsync();
959961

962+
await vi.runAllTimersAsync();
963+
960964
// Buffered events before error
961965
expect(replay).toHaveSentReplay({
962966
recordingPayloadHeader: { segment_id: 0 },

0 commit comments

Comments
 (0)