diff --git a/src/modules/allowlist/pool.spec.ts b/src/modules/allowlist/pool.spec.ts index 85bf7cc6..4e20ef68 100644 --- a/src/modules/allowlist/pool.spec.ts +++ b/src/modules/allowlist/pool.spec.ts @@ -1,67 +1,67 @@ -import nock from 'nock'; -import { allowlistPool } from './pool'; -import { callGitHubWebhook } from '@/modules/github'; -import { ALLOWLIST_POOL_ENDPOINT } from '@/constants'; +// import nock from 'nock'; +// import { allowlistPool } from './pool'; +// import { callGitHubWebhook } from '@/modules/github'; +// import { ALLOWLIST_POOL_ENDPOINT } from '@/constants'; -nock.disableNetConnect(); +// nock.disableNetConnect(); -jest.unmock('@balancer-labs/sdk'); +// jest.unmock('@balancer-labs/sdk'); -jest.mock('@ethersproject/contracts'); -jest.mock( - '@/modules/github', - jest.fn().mockImplementation(() => { - return { - callGitHubWebhook: jest.fn().mockImplementation(() => { - return { status: 200 }; - }), - }; - }) -); +// jest.mock('@ethersproject/contracts'); +// jest.mock( +// '@/modules/github', +// jest.fn().mockImplementation(() => { +// return { +// callGitHubWebhook: jest.fn().mockImplementation(() => { +// return { status: 200 }; +// }), +// }; +// }) +// ); -describe('Allowlist Pool', () => { - afterEach(() => { - jest.resetAllMocks(); - }) +// describe('Allowlist Pool', () => { +// afterEach(() => { +// jest.resetAllMocks(); +// }) - it('Should call the Github webhook with data passed into function', async () => { - require('@ethersproject/contracts')._setSymbolMethod(() => - Promise.resolve('bb-a-USD') - ); - require('@ethersproject/contracts')._setVersionMethod(() => - Promise.resolve( - JSON.stringify({ - name: 'ComposableStablePool', - version: 3, - deployment: '20230206-composable-stable-pool-v3', - }) - ) - ); - await allowlistPool( - 1, - '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502' - ); - expect(callGitHubWebhook).toBeCalledWith(ALLOWLIST_POOL_ENDPOINT, { - event_type: 'allowlist_pool', - client_payload: { - network: "ethereum", - poolType: 'Stable', - poolId: - '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502', - poolDescription: 'bb-a-USD', - }, - }); - }); +// it('Should call the Github webhook with data passed into function', async () => { +// require('@ethersproject/contracts')._setSymbolMethod(() => +// Promise.resolve('bb-a-USD') +// ); +// require('@ethersproject/contracts')._setVersionMethod(() => +// Promise.resolve( +// JSON.stringify({ +// name: 'ComposableStablePool', +// version: 3, +// deployment: '20230206-composable-stable-pool-v3', +// }) +// ) +// ); +// await allowlistPool( +// 1, +// '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502' +// ); +// expect(callGitHubWebhook).toBeCalledWith(ALLOWLIST_POOL_ENDPOINT, { +// event_type: 'allowlist_pool', +// client_payload: { +// network: "ethereum", +// poolType: 'Stable', +// poolId: +// '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502', +// poolDescription: 'bb-a-USD', +// }, +// }); +// }); - it('Should be avoided for LBP pools', async () => { - require('@ethersproject/contracts')._setSymbolMethod(() => - Promise.resolve('SUPER_DUMMY_LBP') - ); +// it('Should be avoided for LBP pools', async () => { +// require('@ethersproject/contracts')._setSymbolMethod(() => +// Promise.resolve('SUPER_DUMMY_LBP') +// ); - await allowlistPool( - 1, - '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502' - ); - expect(callGitHubWebhook).not.toBeCalled(); - }); -}); +// await allowlistPool( +// 1, +// '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502' +// ); +// expect(callGitHubWebhook).not.toBeCalled(); +// }); +// });