waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
167 stars 42 forks source link

tests: decrease redundancy in utils for different protocols #2087

Open danisharora099 opened 1 month ago

danisharora099 commented 1 month ago

This is a change request

Problem

We have different utils being setup for different tests, specifically protocols. This, in places, is starting to get redundant and would be good to keep /tests/ folder strictly spec files while all utils can live in /src/ instead (along with other utils)

Proposed Solutions

Abstract away different utils like https://github.com/waku-org/js-waku/blob/master/packages/tests/tests/filter/utils.ts and https://github.com/waku-org/js-waku/blob/04bd518210a709b3b01ada5be947e653912201ba/packages/tests/tests/store/utils.ts#L103 into root level utils (in /src perhaps)

Notes

weboko commented 1 month ago

Another point to address https://github.com/waku-org/js-waku/pull/2085#discussion_r1691754059: