zeitgeistpm / ui

Zeitgeist general prediction markets application.
https://app.zeitgeist.pm
Apache License 2.0
16 stars 4 forks source link

Set up jest for component testing #836

Closed TvrtkoM closed 1 year ago

TvrtkoM commented 1 year ago

Write a couple of tests for some components of small to medium complexity, and come up with a plan for refactoring other components so they're more easy to test

TvrtkoM commented 1 year ago

Investigated so far:

Jest (since we already use it for unit testing)

Main issues is in uint8arrays dependency that seem to originate from polkadotjs dependencies / sdk and it is related to ipfs-http-client

.../.../zeitgeist/ui/node_modules/multihashes/node_modules/uint8arrays/esm/src/to-string.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import bases from './util/bases.js';

Cypress

TvrtkoM commented 1 year ago

Another library to consider is https://storybook.js.org/

lsaether commented 1 year ago

Look into replacing ipfs-http-client with something else / our own code since it continues to give us issues.