diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json deleted file mode 100644 index 0cbfffb0..00000000 --- a/cypress/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "baseUrl": "../node_modules", - "target": "es5", - "lib": ["es5", "dom"], - "types": ["cypress"] - }, - "include": ["**/*.ts"] -} diff --git a/src/state/application/reducer.test.ts b/src/state/application/reducer.test.ts deleted file mode 100644 index a9644c29..00000000 --- a/src/state/application/reducer.test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ChainId } from '@uniswap/sdk-core' -import { createStore, Store } from 'redux' -import { ApplicationModal, setOpenModal, updateBlockNumber } from './actions' -import reducer, { ApplicationState } from './reducer' - -describe('application reducer', () => { - let store: Store - - beforeEach(() => { - store = createStore(reducer, { - popupList: [], - blockNumber: { - [ChainId.MAINNET]: 3, - }, - openModal: null, - }) - }) - - describe('setOpenModal', () => { - it('set wallet modal', () => { - store.dispatch(setOpenModal(ApplicationModal.WALLET)) - expect(store.getState().openModal).toEqual(ApplicationModal.WALLET) - store.dispatch(setOpenModal(ApplicationModal.WALLET)) - expect(store.getState().openModal).toEqual(ApplicationModal.WALLET) - store.dispatch(setOpenModal(null)) - expect(store.getState().openModal).toEqual(null) - }) - }) - - describe('updateBlockNumber', () => { - it('updates block number', () => { - store.dispatch(updateBlockNumber({ chainId: ChainId.MAINNET, blockNumber: 4 })) - expect(store.getState().blockNumber[ChainId.MAINNET]).toEqual(4) - }) - it('no op if late', () => { - store.dispatch(updateBlockNumber({ chainId: ChainId.MAINNET, blockNumber: 2 })) - expect(store.getState().blockNumber[ChainId.MAINNET]).toEqual(3) - }) - it('works with non-set chains', () => { - store.dispatch(updateBlockNumber({ chainId: ChainId.ROPSTEN, blockNumber: 2 })) - expect(store.getState().blockNumber).toEqual({ - [ChainId.MAINNET]: 3, - [ChainId.ROPSTEN]: 2, - }) - }) - }) -})