Skip to content

Commit

Permalink
Fix package resolution for E2E test (#507)
Browse files Browse the repository at this point in the history
* Add unichain

* fix integ tests

* Bump X SDK

* Point jest to cjs output
  • Loading branch information
codyborn authored Jan 15, 2025
1 parent 78e5caf commit 131d871
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ module.exports = {
// https://swc.rs/docs/usage/jest#usage
'^.+\\.(t|j)s?$': '@swc/jest',
},
moduleNameMapper: {
'^@uniswap/uniswapx-sdk/dist/cjs/(.*)$': '<rootDir>/node_modules/@uniswap/uniswapx-sdk/dist/cjs/$1'
}
}
4 changes: 1 addition & 3 deletions test/e2e/order.test.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/* eslint-disable jest/no-disabled-tests */
import { DutchOrder, DutchOrderBuilder, REACTOR_ADDRESS_MAPPING, SignedUniswapXOrder, UnsignedV2DutchOrder, V2DutchOrderBuilder } from '@uniswap/uniswapx-sdk'
import { factories } from '@uniswap/uniswapx-sdk/dist/types/src/contracts'
import axios from 'axios'
import dotenv from 'dotenv'
import { BigNumber, Contract, ethers, Wallet } from 'ethers'
import { MAX_UINT96, PERMIT2, UNI, WETH, ZERO_ADDRESS } from './constants'
import { v4 as uuidv4 } from 'uuid'

const { ExclusiveDutchOrderReactor__factory } = factories

import { UniswapXOrderEntity } from '../../lib/entities'
import { AVERAGE_BLOCK_TIME } from '../../lib/handlers/check-order-status/util'
import { GetOrdersResponse } from '../../lib/handlers/get-orders/schema/GetOrdersResponse'
import { ChainId } from '../../lib/util/chain'
import * as ERC20_ABI from './abis/erc20.json'
import { stringValue } from 'aws-sdk/clients/iot'
import { ExclusiveDutchOrderReactor__factory } from '@uniswap/uniswapx-sdk/dist/cjs/src/contracts/factories'
const { abi } = ERC20_ABI

dotenv.config()
Expand Down

0 comments on commit 131d871

Please sign in to comment.