-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat(testlib): add enable/disable test debug utils #1315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, great feature, thanks! Shall we add this in a README.md somewhere? (And perhaps the coding guide?)
Agree. We need to document it with all the test development good practices I have been gathering. I add it to my documentation TO-DO list. I'll try to tackle it next week 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! +1 to documenting it.
Fun fact I just learned that nim allows for comments inside comments, which C does't. Helpful for commenting the tests also.
#[
let x = 3
# comments
echo x
#[
long comment
]#
#[
Slightly related. Is someone looking into running specific tests or testsuites?
From our documentation: https://github.com/status-im/nwaku/blob/16c85db43ca492fb762e6acf61888e16812f883a/waku/v1/README.md#L51:~:text=You%20can%20also%20run%20a%20specific%20test%20(and%20alter%20compile%20options%20as%20you%20want)%3A`
|
Merging this without waiting for checks to pass since the module is not imported, there is no risk. |
@alrevuelta 🤣 go ahead and merge #1302 by bypassing the checks. |
Following Javascript's Jest idea of disabling a test by adding an 'x' before/after the test keyword (see Jest docs):
So in our case this is how to use the new test debug utils:
./testlib/testutils
module in your test suite filextest
,xasyncTest
,xsuite
,xprocSuite
, etc.IMPORTANT: Do not forget to re-enable the test cases disabled during your debugging session before committing your changes.