interbtc-ui icon indicating copy to clipboard operation
interbtc-ui copied to clipboard

UI tests broken following Polkadot update.

Open tomjeatt opened this issue 2 years ago • 0 comments

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.

tomjeatt avatar Sep 13 '23 13:09 tomjeatt