ts-odd icon indicating copy to clipboard operation
ts-odd copied to clipboard

ts-odd unit tests running in browsers

Open bdehaynin opened this issue 2 years ago • 2 comments

Summary

Problem

Unit tests are currently run in node only. They may unexpectedly fail in the browser.

Impact

We may miss some error cases.

Solution

Run unit tests in headless browsers using playwright-test.

bdehaynin avatar Aug 04 '23 17:08 bdehaynin

A first step in the task was completed by updating the unit tests to use assert instead of expect: https://github.com/oddsdk/ts-odd/pull/541

In addition, packaging changes were needed in rs-wnfs to support both node and headless browsers at the simultaneously: https://github.com/wnfs-wg/rs-wnfs/pull/318

The ODD SDK needs a few other changes to align with this newer version of rs-wnfs. When that is complete, it should be possible to get the browser tests running.

bgins avatar Aug 21 '23 16:08 bgins

@bgins I just upgraded to the latest rs-wnfs with your wasm packaging changes on the next branch. PR that was merged recently: https://github.com/oddsdk/ts-odd/pull/536

icidasset avatar Aug 21 '23 16:08 icidasset