Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/node/test/integrations/request-session-tracking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('recordRequestSession()', () => {
const client = createTestClient();
const sendSessionSpy = jest.spyOn(client, 'sendSession');

jest.setSystemTime(new Date('March 19, 1999 06:12:34'));
jest.setSystemTime(new Date('March 19, 1999 06:12:34 UTC'));

simulateRequest(client, 'ok');

Expand All @@ -25,7 +25,7 @@ describe('recordRequestSession()', () => {
const client = createTestClient();
const sendSessionSpy = jest.spyOn(client, 'sendSession');

jest.setSystemTime(new Date('March 19, 1999 06:12:34'));
jest.setSystemTime(new Date('March 19, 1999 06:12:34 UTC'));

simulateRequest(client, 'crashed');

Expand All @@ -40,7 +40,7 @@ describe('recordRequestSession()', () => {
const client = createTestClient();
const sendSessionSpy = jest.spyOn(client, 'sendSession');

jest.setSystemTime(new Date('March 19, 1999 06:12:34'));
jest.setSystemTime(new Date('March 19, 1999 06:12:34 UTC'));

simulateRequest(client, 'errored');

Expand All @@ -56,15 +56,15 @@ describe('recordRequestSession()', () => {

const sendSessionSpy = jest.spyOn(client, 'sendSession');

jest.setSystemTime(new Date('March 19, 1999 06:00:00'));
jest.setSystemTime(new Date('March 19, 1999 06:00:00 UTC'));

simulateRequest(client, 'ok');
simulateRequest(client, 'ok');
simulateRequest(client, 'crashed');
simulateRequest(client, 'errored');

// "Wait" 1+ second to get into new bucket
jest.setSystemTime(new Date('March 19, 1999 06:01:01'));
jest.setSystemTime(new Date('March 19, 1999 06:01:01 UTC'));

simulateRequest(client, 'ok');
simulateRequest(client, 'errored');
Expand All @@ -89,12 +89,12 @@ describe('recordRequestSession()', () => {

const sendSessionSpy = jest.spyOn(client, 'sendSession');

jest.setSystemTime(new Date('March 19, 1999 06:00:00'));
jest.setSystemTime(new Date('March 19, 1999 06:00:00 UTC'));

simulateRequest(client, 'ok');

// "Wait" 1+ second to get into new bucket
jest.setSystemTime(new Date('March 19, 1999 06:01:01'));
jest.setSystemTime(new Date('March 19, 1999 06:01:01 UTC'));

simulateRequest(client, 'ok');

Expand Down
Loading