From 82e0cc8b24cc90d73366c6f42268786afa11173a Mon Sep 17 00:00:00 2001 From: Daniel Jackins Date: Wed, 6 Sep 2023 13:57:45 -0600 Subject: [PATCH] update snapshots --- .../node/src/__tests__/http-client.integration.test.ts | 3 +++ packages/node/src/__tests__/http-integration.test.ts | 7 +++++++ .../test-helpers/assert-shape/segment-http-api.ts | 1 + 3 files changed, 11 insertions(+) diff --git a/packages/node/src/__tests__/http-client.integration.test.ts b/packages/node/src/__tests__/http-client.integration.test.ts index d84562fd2..5fdd4ed56 100644 --- a/packages/node/src/__tests__/http-client.integration.test.ts +++ b/packages/node/src/__tests__/http-client.integration.test.ts @@ -37,6 +37,9 @@ const helpers = { timestamp: expect.stringMatching( /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/ ), + sentAt: expect.stringMatching( + /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/ + ), properties: {}, event: 'foo', type: 'track', diff --git a/packages/node/src/__tests__/http-integration.test.ts b/packages/node/src/__tests__/http-integration.test.ts index f52884dec..d9a5891e9 100644 --- a/packages/node/src/__tests__/http-integration.test.ts +++ b/packages/node/src/__tests__/http-integration.test.ts @@ -18,6 +18,7 @@ const snapshotMatchers = { }, _metadata: expect.any(Object), timestamp: expect.any(String), + sentAt: expect.any(String), } }, get defaultReqBody() { @@ -143,6 +144,7 @@ describe('Method Smoke Tests', () => { }, "integrations": Object {}, "messageId": Any, + "sentAt": Any, "timestamp": Any, "traits": Object { "foo": "bar", @@ -182,6 +184,7 @@ describe('Method Smoke Tests', () => { "properties": Object { "hello": "world", }, + "sentAt": Any, "timestamp": Any, "type": "track", "userId": "foo", @@ -213,6 +216,7 @@ describe('Method Smoke Tests', () => { "messageId": Any, "name": "page", "properties": Object {}, + "sentAt": Any, "timestamp": Any, "type": "page", }, @@ -246,6 +250,7 @@ describe('Method Smoke Tests', () => { "groupId": "myGroupId", "integrations": Object {}, "messageId": Any, + "sentAt": Any, "timestamp": Any, "traits": Object { "some_traits": 123, @@ -277,6 +282,7 @@ describe('Method Smoke Tests', () => { "integrations": Object {}, "messageId": Any, "previousId": "previous", + "sentAt": Any, "timestamp": Any, "type": "alias", "userId": "alias", @@ -314,6 +320,7 @@ describe('Method Smoke Tests', () => { "properties": Object { "title": "wip", }, + "sentAt": Any, "timestamp": Any, "type": "screen", }, diff --git a/packages/node/src/__tests__/test-helpers/assert-shape/segment-http-api.ts b/packages/node/src/__tests__/test-helpers/assert-shape/segment-http-api.ts index 4c6a02743..6bf608043 100644 --- a/packages/node/src/__tests__/test-helpers/assert-shape/segment-http-api.ts +++ b/packages/node/src/__tests__/test-helpers/assert-shape/segment-http-api.ts @@ -7,6 +7,7 @@ import { HTTPClientRequest } from '../../../lib/http-client' export const httpClientOptionsBodyMatcher = { messageId: expect.stringMatching(/^node-next-\d*-\w*-\w*-\w*-\w*-\w*/), timestamp: expect.any(Date), + sentAt: expect.any(Date), _metadata: expect.any(Object), context: { library: {