diff --git a/go/webhook/testcases/testdata/testcases/pipedream/alias_type____type_and_user_id_is_given.json b/go/webhook/testcases/testdata/testcases/pipedream/alias_type____type_and_user_id_is_given.json index d28c468cb7..b21cf43f37 100644 --- a/go/webhook/testcases/testdata/testcases/pipedream/alias_type____type_and_user_id_is_given.json +++ b/go/webhook/testcases/testdata/testcases/pipedream/alias_type____type_and_user_id_is_given.json @@ -23,6 +23,7 @@ "type": "alias", "previousId": "name@surname.com", "userId": "12345", + "context": {}, "receivedAt": "2024-03-03T04:48:29.000Z", "request_ip": "192.0.2.30", "messageId": "00000000-0000-0000-0000-000000000000" diff --git a/go/webhook/testcases/testdata/testcases/pipedream/identify_type____type_and_user_id_is_given.json b/go/webhook/testcases/testdata/testcases/pipedream/identify_type____type_and_user_id_is_given.json index a8ddaecf11..11b5cc2cb8 100644 --- a/go/webhook/testcases/testdata/testcases/pipedream/identify_type____type_and_user_id_is_given.json +++ b/go/webhook/testcases/testdata/testcases/pipedream/identify_type____type_and_user_id_is_given.json @@ -39,6 +39,7 @@ { "userId": "1", "originalTimestamp": "2020-09-28T19:53:31.900Z", + "context": {}, "traits": { "firstName": "John", "lastName": "doe", diff --git a/test/integrations/testUtils.ts b/test/integrations/testUtils.ts index 6eaf662c78..13c0727f8f 100644 --- a/test/integrations/testUtils.ts +++ b/test/integrations/testUtils.ts @@ -24,16 +24,17 @@ const generateAlphanumericId = (size = 36) => export const getTestDataFilePaths = (dirPath: string, opts: OptionValues): string[] => { const globPattern = join(dirPath, '**', 'data.ts'); let testFilePaths = globSync(globPattern); + let filteredTestFilePaths: string[] = []; if (opts.destination || opts.source) { - testFilePaths = testFilePaths.filter((testFile) => - testFile.includes(`${opts.destination}/` || opts.source), + filteredTestFilePaths = testFilePaths.filter((testFile) => + testFile.includes(`${opts.destination || opts.source}/`), ); } if (opts.feature) { - testFilePaths = testFilePaths.filter((testFile) => testFile.includes(opts.feature)); + filteredTestFilePaths = testFilePaths.filter((testFile) => testFile.includes(opts.feature)); } - return testFilePaths; + return filteredTestFilePaths; }; export const getTestData = (filePath): TestCaseData[] => {