Skip to content

Fix unit tests by mocking #1147

Fix unit tests by mocking

Fix unit tests by mocking #1147

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / jest-github-action failed Sep 12, 2023 in 0s

Jest tests failed

Failed tests: 0/64. Failed suites: 0/8.

Details

  ● Test suite failed to run

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

    > 1 | import 'cross-fetch/polyfill'
        | ^
      2 | import {
      3 |   Address,
      4 |   AppDataHash,

      at Object.<anonymous> (node_modules/cross-fetch/dist/node-polyfill.js:2:31)
      at Object.<anonymous> (src/order-book/api.ts:1:1)
      at Object.<anonymous> (src/order-book/index.ts:1:1)
      at Object.<anonymous> (src/composable/ConditionalOrder.ts:17:1)
      at Object.<anonymous> (src/composable/orderTypes/Twap.ts:3:1)
      at Object.<anonymous> (src/composable/Multiplexer.spec.ts:4:1)

  ● Test suite failed to run

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

    > 1 | import 'cross-fetch/polyfill'
        | ^
      2 | import {
      3 |   Address,
      4 |   AppDataHash,

      at Object.<anonymous> (node_modules/cross-fetch/dist/node-polyfill.js:2:31)
      at Object.<anonymous> (src/order-book/api.ts:1:1)
      at Object.<anonymous> (src/order-book/index.ts:1:1)
      at Object.<anonymous> (src/composable/ConditionalOrder.ts:17:1)
      at Object.<anonymous> (src/composable/orderTypes/Twap.ts:3:1)
      at Object.<anonymous> (src/composable/orderTypes/Twap.spec.ts:1:1)

  ● Test suite failed to run

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

    > 1 | import 'cross-fetch/polyfill'
        | ^
      2 | import {
      3 |   Address,
      4 |   AppDataHash,

      at Object.<anonymous> (node_modules/cross-fetch/dist/node-polyfill.js:2:31)
      at Object.<anonymous> (src/order-book/api.ts:1:1)
      at Object.<anonymous> (src/order-book/index.ts:1:1)
      at Object.<anonymous> (src/composable/ConditionalOrder.ts:17:1)
      at Object.<anonymous> (src/composable/orderTypes/Twap.ts:3:1)
      at Object.<anonymous> (src/composable/utils.spec.ts:2:1)