Skip to content

Commit d572c1e

Browse files
committed
Do not assert timestamps as numbers. Check if they are defined.
1 parent b9afed0 commit d572c1e

File tree

1 file changed

+3
-3
lines changed
  • packages/node-integration-tests/utils

1 file changed

+3
-3
lines changed

packages/node-integration-tests/utils/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const conditionalTest = (allowedVersion: { min?: number; max?: number }):
3333
export const assertSentryEvent = (actual: Record<string, unknown>, expected: Record<string, unknown>): void => {
3434
expect(actual).toMatchObject({
3535
event_id: expect.any(String),
36-
timestamp: expect.any(Number),
36+
timestamp: expect.anything(),
3737
...expected,
3838
});
3939
};
@@ -47,8 +47,8 @@ export const assertSentryEvent = (actual: Record<string, unknown>, expected: Rec
4747
export const assertSentryTransaction = (actual: Record<string, unknown>, expected: Record<string, unknown>): void => {
4848
expect(actual).toMatchObject({
4949
event_id: expect.any(String),
50-
timestamp: expect.any(Number),
51-
start_timestamp: expect.any(Number),
50+
timestamp: expect.anything(),
51+
start_timestamp: expect.anything(),
5252
spans: expect.any(Array),
5353
type: 'transaction',
5454
...expected,

0 commit comments

Comments
 (0)