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

chore: add skipOnWin and skipOnUnix test helpers #746

Merged
merged 1 commit into from Jun 18, 2017
Merged

Conversation

nfischer
Copy link
Member

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.

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.
@nfischer nfischer added the chore label Jun 18, 2017
@codecov-io
Copy link

codecov-io commented Jun 18, 2017

Codecov Report

Merging #746 into master will decrease coverage by 0.25%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/exec.js 96.33% <0%> (-3.67%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5823ab1...adc4613. Read the comment docs.

@nfischer
Copy link
Member Author

The coverage report is wrong, this doesn't actually change exec coverage. I just didn't rebase off master after #742 landed.

@nfischer
Copy link
Member Author

self-LGTM since this doesn't affect production logic (and doesn't actually affect coverage)

@nfischer nfischer merged commit 38b57c8 into master Jun 18, 2017
@nfischer nfischer deleted the skip-on-platform branch June 18, 2017 18:51
nfischer added a commit that referenced this pull request Aug 11, 2017
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.
nfischer added a commit that referenced this pull request Aug 11, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants