Skip to content

Commit

Permalink
Merge branch 'develop' into fix.pr-conflicts-jan9
Browse files Browse the repository at this point in the history
  • Loading branch information
koladilip authored Jan 10, 2024
2 parents 2486029 + 81ab6e8 commit 88a4a5d
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Report Code Coverage
name: DT Tests
on:
workflow_call:
secrets:
Expand Down Expand Up @@ -30,8 +30,9 @@ jobs:

- name: Run Tests
run: |
npm run test:js:ci
npm run test:ts:ci
# Supress logging in tests
LOG_LEVEL=100 npm run test:js:ci
LOG_LEVEL=100 npm run test:ts:ci
- name: Run Lint Checks
run: |
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/test.yml → .github/workflows/ut-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ on:
- synchronize

jobs:
test:
name: Run Tests
ut_tests:
name: UT Tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.17

- name: Install Latest Version of Kind
run: go install sigs.k8s.io/[email protected]

- name: Checkout
uses: actions/[email protected]
with:
Expand All @@ -26,19 +34,6 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Run Unit Tests
run: |
npm run test:js:ci
npm run test:ts:ci
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.17

- name: Install Latest Version of Kind
run: go install sigs.k8s.io/[email protected]

- name: Create Kind cluster
run: kind create cluster --name kind-cluster --config=test/__tests__/data/worker-nodes-kind.yml

Expand Down
2 changes: 0 additions & 2 deletions src/adapters/networkHandlerFactory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ describe(`Network Handler Tests`, () => {
it('Should return v0 handler if v1 version and handler is present for destination in v0', () => {
const { networkHandler, handlerVersion } = getNetworkHandler('braze', `v1`);
const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler;
console.log(networkHandler);
expect(networkHandler).toEqual(new brazeProxy());
});

it('Should return generic handler', () => {
const { networkHandler, handlerVersion } = getNetworkHandler('abc', `v1`);
const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler;
console.log(networkHandler);
expect(networkHandler).toEqual(new GenericNetworkHandler());
});
});
2 changes: 0 additions & 2 deletions src/v0/destinations/bqstream/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ describe('getRearrangedEvents', () => {
],
];
const result = getRearrangedEvents(successEventslist, errorEventsList);
console.log(JSON.stringify(result));
expect(result).toEqual(expected);
});

Expand Down Expand Up @@ -261,7 +260,6 @@ describe('getRearrangedEvents', () => {
],
];
const result = getRearrangedEvents(successEventslist, errorEventsList);
console.log(JSON.stringify(result));
expect(result).toEqual(expected);
});
});
1 change: 0 additions & 1 deletion src/v0/destinations/ga4/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ describe('Google Analytics 4 utils test', () => {
const output = validateEventName('Grisly1234567_Open_General_Setting');
expect(output).toEqual();
} catch (error) {
console.log(error.message);
expect(error.message).toEqual();
}
});
Expand Down
1 change: 0 additions & 1 deletion src/v0/destinations/mp/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,6 @@ describe('Mixpanel utils test', () => {
const setOnceProperties = ['name', 'email'];

const result = trimTraits(traits, contextTraits, setOnceProperties);
console.log(result);

expect(result).toEqual({
traits: {
Expand Down
1 change: 0 additions & 1 deletion src/v0/util/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ describe('Utility Functions Tests', () => {
test.each(funcTestData)('$description', async ({ description, input, output }) => {
try {
let result;
console.log(Object.values(input));
result = utilities[funcName](...Object.values(input));
expect(result).toEqual(output);
} catch (e) {
Expand Down
3 changes: 0 additions & 3 deletions test/__tests__/marketo_bulk_upload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ describe(`${integration} Tests`, () => {
const output = await vRouter.pollStatus(input);
expect(output).toEqual(respPollBody[index]);
} catch (error) {
console.log("CHEEECKKKK");
console.log(error);
console.log(respPollBody[index].error);
expect(error.message).toEqual(respPollBody[index].error);
}
});
Expand Down
1 change: 0 additions & 1 deletion test/__tests__/user_transformation_errors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ describe("JS Transformation Error Tests", () => {
true,
);

console.log('XTE: ', result.transformedEvents)
expect(result.transformedEvents.length).toBe(1);
result.transformedEvents.forEach(ev => { expect(ev.error).toEqual(
`ReferenceError: x is not defined
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": ["./src/**/*.test.js", "./src/**/*.test.ts"],
"exclude": ["./src/**/*.test.js", "./src/**/*.test.ts", "./test"],
"include": ["./src", "./src/**/*.json"]
}

0 comments on commit 88a4a5d

Please sign in to comment.