Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljackins committed Sep 6, 2023
1 parent 71988c7 commit 82e0cc8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/node/src/__tests__/http-client.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
7 changes: 7 additions & 0 deletions packages/node/src/__tests__/http-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const snapshotMatchers = {
},
_metadata: expect.any(Object),
timestamp: expect.any(String),
sentAt: expect.any(String),
}
},
get defaultReqBody() {
Expand Down Expand Up @@ -143,6 +144,7 @@ describe('Method Smoke Tests', () => {
},
"integrations": Object {},
"messageId": Any<String>,
"sentAt": Any<String>,
"timestamp": Any<String>,
"traits": Object {
"foo": "bar",
Expand Down Expand Up @@ -182,6 +184,7 @@ describe('Method Smoke Tests', () => {
"properties": Object {
"hello": "world",
},
"sentAt": Any<String>,
"timestamp": Any<String>,
"type": "track",
"userId": "foo",
Expand Down Expand Up @@ -213,6 +216,7 @@ describe('Method Smoke Tests', () => {
"messageId": Any<String>,
"name": "page",
"properties": Object {},
"sentAt": Any<String>,
"timestamp": Any<String>,
"type": "page",
},
Expand Down Expand Up @@ -246,6 +250,7 @@ describe('Method Smoke Tests', () => {
"groupId": "myGroupId",
"integrations": Object {},
"messageId": Any<String>,
"sentAt": Any<String>,
"timestamp": Any<String>,
"traits": Object {
"some_traits": 123,
Expand Down Expand Up @@ -277,6 +282,7 @@ describe('Method Smoke Tests', () => {
"integrations": Object {},
"messageId": Any<String>,
"previousId": "previous",
"sentAt": Any<String>,
"timestamp": Any<String>,
"type": "alias",
"userId": "alias",
Expand Down Expand Up @@ -314,6 +320,7 @@ describe('Method Smoke Tests', () => {
"properties": Object {
"title": "wip",
},
"sentAt": Any<String>,
"timestamp": Any<String>,
"type": "screen",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 82e0cc8

Please sign in to comment.