-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improve metadata checks #847
Comments
Also, from what I can tell, we don't really prevent See #846 (comment) |
👍 on the |
It does make sense if you know you need to write a serial test (e.g. because all related tests in the same file are serial). |
Could I take this issue on? |
@asafigan You're more than welcome to! |
Thanks! |
Non comprehensive list of validations:
Create a new module |
Do you just want me to make the module and test? or do you want me to also integrate it into the other modules? |
Integrate it. So maybe one/two integration tests to |
should we prevent skipping hooks? |
also should we allow only on hooks? |
So for integration I'm thinking that validation would be done in the runner's _addTest method. It would run the validation and if the result isn't null, it would throw an error with the string from the validation test. Does that seem good? |
When I was doing the integration I found that 'skip' should work with hooks |
No
No |
ok, that's what I assumed after looking into it myself. |
We currently validate the test
metadata
property in two different places:todo
is checked herealways
andonly
are checked herefailing
on any test or hook, but as discussed here, we probably only want to allow that on tests, not hooks.skip.only
anywhere, but we probably should.This should probably all be extracted into
lib/validate-test.js
, with something like this:This would simplify our tests for these validations as well (they could be unit tests for this validation module, instead of integration tests that require spinning up forks).
The text was updated successfully, but these errors were encountered: