diff --git a/test/integrations/component.test.ts b/test/integrations/component.test.ts index 847dd4c91fc..9abbb5cfccb 100644 --- a/test/integrations/component.test.ts +++ b/test/integrations/component.test.ts @@ -20,7 +20,8 @@ import { import tags from '../../src/v0/util/tags'; import { Server } from 'http'; import { appendFileSync } from 'fs'; -import { responses } from '../testHelper'; +import { assertRouterOutput, responses } from '../testHelper'; +import { assert } from 'console'; // To run single destination test cases // npm run test:ts -- component --destination=adobe_analytics @@ -122,6 +123,11 @@ const testRoute = async (route, tcData: TestCaseData) => { .query(params || {}) .send(body); const outputResp = tcData.output.response || ({} as any); + + if (tcData.feature === tags.FEATURES.BATCH || tcData.feature === tags.FEATURES.ROUTER) { + assertRouterOutput(response.body.output, tcData.input.request.body.input); + } + expect(response.status).toEqual(outputResp.status); if (outputResp?.body) {