Skip to content

chore: add more description to trading types #1572

chore: add more description to trading types

chore: add more description to trading types #1572

GitHub Actions / jest-github-action failed Nov 27, 2024 in 0s

Jest tests failed

Failed tests: 4/220. Failed suites: 4/20.

Details

  ● postOnChainTrade › When transaction gas estimation is failed, then should use fallback value + 20%

    expect(received).toBe(expected) // Object.is equality

    Expected: 180000
    Received: NaN

      117 |     const call = (signer.sendTransaction as jest.Mock).mock.calls[0][0]
      118 |
    > 119 |     expect(+call.gasLimit).toBe(180000) // 150000 by default + 20%
          |                            ^
      120 |   })
      121 |
      122 |   it('Should create an on-chain transaction with all specified parameters', async () => {

      at Object.toBe (src/trading/postOnChainTrade.test.ts:119:28)

  ● getEthFlowTransaction › Should always override sell token with wrapped native token

    TypeError: Cannot read properties of undefined (reading 'includes')

      62 |     const wrappedToken = WRAPPED_NATIVE_CURRENCIES[chainId]
      63 |
    > 64 |     expect(result.transaction.callData.includes(params.sellToken.slice(2))).toBe(false)
         |                                        ^
      65 |     expect(result.transaction.callData.includes(wrappedToken.slice(2))).toBe(false)
      66 |   })
      67 |

      at Object.includes (src/trading/getEthFlowTransaction.test.ts:64:40)

  ● getEthFlowTransaction › Should call gas estimation and return estimated value + 20%

    expect(received).toBe(expected) // Object.is equality

    Expected: 150000
    Received: NaN

      70 |     const gasNum = +GAS
      71 |
    > 72 |     expect(+result.transaction.gasLimit).toBe(gasNum + gasNum * 0.2)
         |                                          ^
      73 |   })
      74 |
      75 |   it('Transaction value should be equal to sell amount', async () => {

      at Object.toBe (src/trading/getEthFlowTransaction.test.ts:72:42)

  ● getPreSignTransaction › Should call gas estimation and return estimated value + 20%

    expect(received).toBe(expected) // Object.is equality

    Expected: 150000
    Received: NaN

      50 |     const gasNum = +GAS
      51 |
    > 52 |     expect(+result.gasLimit).toBe(gasNum + gasNum * 0.2)
         |                              ^
      53 |   })
      54 |
      55 |   it('Tx value should always be zero', async () => {

      at Object.toBe (src/trading/getPreSignTransaction.test.ts:52:30)

Annotations

Check failure on line 0 in src/trading/postOnChainTrade.test.ts

See this annotation in the file changed.

@github-actions github-actions / jest-github-action

postOnChainTrade > When transaction gas estimation is failed, then should use fallback value + 20%

Error: expect(received).toBe(expected) // Object.is equality

Expected: 180000
Received: NaN
    at Object.toBe (/home/runner/work/cow-sdk/cow-sdk/src/trading/postOnChainTrade.test.ts:119:28)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in src/trading/getEthFlowTransaction.test.ts

See this annotation in the file changed.

@github-actions github-actions / jest-github-action

getEthFlowTransaction > Should always override sell token with wrapped native token

TypeError: Cannot read properties of undefined (reading 'includes')
    at Object.includes (/home/runner/work/cow-sdk/cow-sdk/src/trading/getEthFlowTransaction.test.ts:64:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in src/trading/getEthFlowTransaction.test.ts

See this annotation in the file changed.

@github-actions github-actions / jest-github-action

getEthFlowTransaction > Should call gas estimation and return estimated value + 20%

Error: expect(received).toBe(expected) // Object.is equality

Expected: 150000
Received: NaN
    at Object.toBe (/home/runner/work/cow-sdk/cow-sdk/src/trading/getEthFlowTransaction.test.ts:72:42)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in src/trading/getPreSignTransaction.test.ts

See this annotation in the file changed.

@github-actions github-actions / jest-github-action

getPreSignTransaction > Should call gas estimation and return estimated value + 20%

Error: expect(received).toBe(expected) // Object.is equality

Expected: 150000
Received: NaN
    at Object.toBe (/home/runner/work/cow-sdk/cow-sdk/src/trading/getPreSignTransaction.test.ts:52:30)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)