Skip to content

chore: rename postSellNativeCurrencyOrder #1595

chore: rename postSellNativeCurrencyOrder

chore: rename postSellNativeCurrencyOrder #1595

GitHub Actions / jest-github-action failed Dec 5, 2024 in 0s

Jest tests failed

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

Details

  ● postSellNativeCurrencyOrder › When sell token is native, then should post on-chain order

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

      88 |
      89 |   it('When sell token is native, then should post on-chain order', async () => {
    > 90 |     postSellNativeCurrencyTradeMock.mockResolvedValue({ orderId: '0x01' })
         |                                     ^
      91 |
      92 |     const order = { ...defaultOrderParams, sellToken: ETH_ADDRESS, quoteId }
      93 |     await postSellNativeCurrencyOrder(orderBookApiMock, signer, appDataMock, order)

      at Object.mockResolvedValue (src/trading/postCoWProtocolTrade.test.ts:90:37)

  ● postSellNativeCurrencyOrder › When sell token is native, then should post on-chain order

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

      83 |   afterEach(() => {
      84 |     signOrderMock.mockReset()
    > 85 |     postSellNativeCurrencyTradeMock.mockReset()
         |                                     ^
      86 |     sendOrderMock.mockReset()
      87 |   })
      88 |

      at Object.mockReset (src/trading/postCoWProtocolTrade.test.ts:85:37)

  ● postSellNativeCurrencyOrder › API request should contain all specified parameters

    TypeError: (0 , _postSellNativeCurrencyOrder.postSellNativeCurrencyOrder) is not a function

      101 |
      102 |     const order = { ...defaultOrderParams, quoteId }
    > 103 |     await postSellNativeCurrencyOrder(orderBookApiMock, signer, appDataMock, order)
          |                                      ^
      104 |
      105 |     const callBody = sendOrderMock.mock.calls[0][0]
      106 |

      at Object.<anonymous> (src/trading/postCoWProtocolTrade.test.ts:103:38)

  ● postSellNativeCurrencyOrder › API request should contain all specified parameters

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

      83 |   afterEach(() => {
      84 |     signOrderMock.mockReset()
    > 85 |     postSellNativeCurrencyTradeMock.mockReset()
         |                                     ^
      86 |     sendOrderMock.mockReset()
      87 |   })
      88 |

      at Object.mockReset (src/trading/postCoWProtocolTrade.test.ts:85:37)

Annotations

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

See this annotation in the file changed.

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

postSellNativeCurrencyOrder > When sell token is native, then should post on-chain order

TypeError: Cannot read properties of undefined (reading 'mockResolvedValue')
    at Object.mockResolvedValue (/home/runner/work/cow-sdk/cow-sdk/src/trading/postCoWProtocolTrade.test.ts:90:37)
    at Promise.then.completed (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/testWorker.js:106:12)

TypeError: Cannot read properties of undefined (reading 'mockReset')
    at Object.mockReset (/home/runner/work/cow-sdk/cow-sdk/src/trading/postCoWProtocolTrade.test.ts:85:37)
    at Promise.then.completed (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusHook (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:281:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:254:5)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/testWorker.js:106:12)

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

See this annotation in the file changed.

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

postSellNativeCurrencyOrder > API request should contain all specified parameters

TypeError: (0 , _postSellNativeCurrencyOrder.postSellNativeCurrencyOrder) is not a function
    at Object.<anonymous> (/home/runner/work/cow-sdk/cow-sdk/src/trading/postCoWProtocolTrade.test.ts:103:38)
    at Promise.then.completed (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/testWorker.js:106:12)

TypeError: Cannot read properties of undefined (reading 'mockReset')
    at Object.mockReset (/home/runner/work/cow-sdk/cow-sdk/src/trading/postCoWProtocolTrade.test.ts:85:37)
    at Promise.then.completed (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusHook (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:281:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:254:5)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:121:9)
    at run (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (/home/runner/work/cow-sdk/cow-sdk/node_modules/jest-runner/build/testWorker.js:106:12)