Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: decrease redundancy in utils for different protocols #2087

Open
danisharora099 opened this issue Jul 25, 2024 · 1 comment
Open

tests: decrease redundancy in utils for different protocols #2087

danisharora099 opened this issue Jul 25, 2024 · 1 comment
Labels
debt Technical debt marker test Issue related to the test suite with no expected consequence to production code

Comments

@danisharora099
Copy link
Collaborator

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

export async function startAndConnectLightNode(
into root level utils (in /src perhaps)

Notes

@fryorcraken fryorcraken added this to Waku Jul 25, 2024
@weboko weboko moved this to Triage in Waku Jul 25, 2024
@weboko weboko added debt Technical debt marker test Issue related to the test suite with no expected consequence to production code labels Jul 25, 2024
@weboko
Copy link
Collaborator

weboko commented Jul 25, 2024

Another point to address #2085 (comment):

  • stop using createLightNode/createRelayNode directly and instead create createTestLightNode/createTestRelayNode util that will be configured for DefaultTestShardInfo and other test defaults;
  • remove runNode/runStoreNode/runNodeBuilder/runNodes utils in favor of one and do not pass any shardInfo as it defaults to DefaultTestShardInfo;
  • remove all custom const PubsubTopics/ShardInfo etc and use only DefaultTestShardInfo/DefaultTestPubsubTopic;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Technical debt marker test Issue related to the test suite with no expected consequence to production code
Projects
Status: To Do
Development

No branches or pull requests

2 participants