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
chore: add skipOnWin and skipOnUnix test helpers #746
Conversation
This adds `skipOnWin` and `skipOnUnix` to help us manage our platform-dependent tests. These methods give a nice warning message when we skip tests. We may also consider adding warnings when running platform-dependent tests. Part of the motivation for this is if we ever update to AVA v0.19. This version requires at least one assertion per test case. While this could be disabled with an AVA setting, we instead benefit from warnings for any case when we unintentionally skip assertions. This adds chalk as a dev dependency to enable colored messages.
Codecov Report
@@ Coverage Diff @@
## master #746 +/- ##
==========================================
- Coverage 97.38% 97.12% -0.26%
==========================================
Files 33 33
Lines 1222 1252 +30
==========================================
+ Hits 1190 1216 +26
- Misses 32 36 +4
Continue to review full report at Codecov.
|
The coverage report is wrong, this doesn't actually change |
self-LGTM since this doesn't affect production logic (and doesn't actually affect coverage) |
This updates tests for `AVA` 19.0.0+. `AVA` 0.18.0 has a breaking change which changes the current working directory for tests. As a result, we need to change 'resources' -> 'test/resources' (and similar path changes). `AVA` 0.19.0 has a breaking change that all tests must run at least one assert. This breaking change was already resolved by #746, so no change was necessary in this PR. This updates to `AVA` 0.21.0, since there are no other breaking changes.
This updates tests for `AVA` 19.0.0+. `AVA` 0.18.0 has a breaking change which changes the current working directory for tests. As a result, we need to change 'resources' -> 'test/resources' (and similar path changes). `AVA` 0.19.0 has a breaking change that all tests must run at least one assert. This breaking change was already resolved by #746, so no change was necessary in this PR. This updates to `AVA` 0.21.0, since there are no other breaking changes.
This adds
skipOnWin
andskipOnUnix
to help us manage our platform-dependenttests. These methods give a nice warning message when we skip tests. We may also
consider adding warnings when running platform-dependent tests.
Part of the motivation for this is if we ever update to AVA v0.19. This version
requires at least one assertion per test case. While this could be disabled with
an AVA setting, we instead benefit from warnings for any case when we
unintentionally skip assertions.
This adds chalk as a dev dependency to enable colored messages.