-
Notifications
You must be signed in to change notification settings - Fork 21
Support for callback function to skip tests #26
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
Support for callback function to skip tests #26
Conversation
There is already a |
Unfortunately not :x since
which is pretty generic and happens across multiple test suites 😄 we're trying to ignore only specific files and not for all error messages of that kind
Not too sure if they're the same thing though 🤔 since silencing messages are used for silencing messages from the error message output. I would extend |
Ok I get your point. Let's keep like this. However I would remove the skipTestNames option. I have no issue with bumping a major release to be safe. One last thing, could you add one test case for th renew option please? |
Added as of previous 2 commits 😄 |
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.
Looks good to me. I'm on the phone now, I'll finish the review, merge and release when I'm back on the computer 🙂
tests/index.test.js
Outdated
@@ -29,6 +29,12 @@ describe('jest-fail-on-console', () => { | |||
expect(stderr).toEqual(expect.stringContaining(passString('error-disabled'))) | |||
}) | |||
|
|||
it.only('does not error when console.error() is called and skip test returns true', async () => { |
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.
skip should be removed 😅
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.
whoops, my bad 😅 got too used to linters warning me about this 3175ba9
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 I understand, same here!
Hey @ValentinH any word on reviewing this PR? 😄 Just wanted to make sure it wasn't forgotten, no rush if you're busy atm 👍 |
I'll merge this on Monday. Sorry for the delay . |
Yayy thank you! 🙌 |
Addition of a
skipTest
callback function param which provides a higher degree of customization to determine if a test should be skipped or not.