Skip to content

Commit

Permalink
chore: move mixpanel tests to component test suite (#2668)
Browse files Browse the repository at this point in the history
* chore: move mipanel tests to compoennt test suite

* remove old test suite

* chore: add global destination for reuse in test cases

* chore: refactor mp tests to resue destination

* chore: make a common file for common modules

* refactor: mp component tests

---------

Co-authored-by: Dilip Kola <kdilipkola@gmail.com>
  • Loading branch information
ujjwal-ab and koladilip authored Oct 4, 2023
1 parent b5d28a3 commit 0ecd031
Show file tree
Hide file tree
Showing 9 changed files with 6,746 additions and 6,750 deletions.
4,452 changes: 0 additions & 4,452 deletions test/__tests__/data/mp_input.json

This file was deleted.

1,330 changes: 0 additions & 1,330 deletions test/__tests__/data/mp_output.json

This file was deleted.

603 changes: 0 additions & 603 deletions test/__tests__/data/mp_router_input.json

This file was deleted.

303 changes: 0 additions & 303 deletions test/__tests__/data/mp_router_output.json

This file was deleted.

62 changes: 0 additions & 62 deletions test/__tests__/mixpanel.test.js

This file was deleted.

23 changes: 23 additions & 0 deletions test/integrations/destinations/mp/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const defaultMockFns = () => {
jest.spyOn(Date, 'now').mockImplementation(() => new Date(Date.UTC(2020, 0, 25)).valueOf());
};

const sampleDestination = {
Config: {
apiKey: 'dummyApiKey',
token: 'dummyApiKey',
prefixProperties: true,
useNativeSDK: false,
},
DestinationDefinition: {
DisplayName: 'Mixpanel',
ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie',
Name: 'MP',
},
Enabled: true,
ID: '1WhcOCGgj9asZu850HvugU2C3Aq',
Name: 'MP',
Transformations: [],
};

export { sampleDestination, defaultMockFns };
Loading

0 comments on commit 0ecd031

Please sign in to comment.