js-waku icon indicating copy to clipboard operation
js-waku copied to clipboard

Add interoperability tests with nwaku to browser suite

Open fryorcraken opened this issue 2 years ago • 0 comments

This is a change request/

Problem

Interoperability tests are only executed in NodeJS because we setup the nwaku node as part of the test. This is not possible in the browser as the browser cannot start a process etc,

This means some bugs: https://github.com/status-im/js-waku/issues/886 can only be found once we manually test js-waku in an example, against a nwaku fleet.

Proposed Solutions

Do some interop test in the browser.

The current NodeJS strategy is unlikely to work (start nwaku node in beforeEach hooks) so we may need to use a different approach:

  1. Start a local fleet of nwaku nodes first
  2. Set node connection details in a global variable
  3. Use these nodes to run the test, possible using dynamic content topic to avoid test clashing

This may actually result in the test suite running faster as it means nwaku nodes are re-used and started in parallel.

Investigating execute some beforeEach like hook with karma framework might make sense too but should be time boxed.

fryorcraken avatar Aug 16 '22 04:08 fryorcraken