interlay / interbtc-ui

Kintsugi and Interlay App - BTC DeFi
https://app.interlay.io/
Apache License 2.0
32 stars 30 forks source link

UI tests broken following Polkadot update. #1562

Open tomjeatt opened 1 year ago

tomjeatt commented 1 year ago

Our UI tests have stopped running following the changes to support the Polkadot 10.9.1 upgrade. This is specifically related to the polkadot update itself, not the lib or bridge (i.e. I tested by using the previous version of the UI changing only @polkadot/api to 10.9.1—the tests failed).

The cause of the problem seems to be that jest can't find polkadot's x-textdecoder dependency:

 FAIL  src/test/pages/Loans/index.test.tsx
  ● Test suite failed to run

    ENOENT: no such file or directory, open 'node:util'

      at Runtime.readFile (node_modules/jest-runtime/build/index.js:1987:21)
      at Object.<anonymous> (node_modules/@polkadot/x-textdecoder/cjs/node.js:5:45)

This error is reported for every test suite.