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

Fix broken cli tests #57

Merged
merged 2 commits into from
May 18, 2017

Conversation

BenoitZugmeyer
Copy link
Contributor

What: The CLI tests are failing since #54.

Why: #54 changes the output of files printed to stdout, but didn't change the expected output in the tests.

How: Fixed by adjusting the expected output + adding CLI tests to the CI.

@@ -49,7 +53,7 @@ module.exports = {
},
validate: {
description: 'This runs several scripts to make sure things look good before committing or on clean install',
script: concurrent.nps('lint', 'build', 'test'),
script: concurrent.nps('lint', 'build', 'test', 'test.cli'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Nice! I had no idea we weren't running those! 😅 thank you!

@kentcdodds
Copy link
Member

Hmmm... Looks like the tests don't pass on travis.

@BenoitZugmeyer BenoitZugmeyer force-pushed the fix-broken-cli-tests branch from 055113f to f383198 Compare May 18, 2017 20:53
@BenoitZugmeyer
Copy link
Contributor Author

Sorry I edited the first commit to make sure the prettier-eslint output isn't printing colors. But it seems it still doesn't work on travis... I'm on it.

@BenoitZugmeyer BenoitZugmeyer force-pushed the fix-broken-cli-tests branch from f383198 to 72ea572 Compare May 18, 2017 21:13
In order to make sure the prettier-eslint command won't display colored
output, we have to tweak the environment variables. We don't want
colored output because it won't match jest snapshots.
In prettier#54 I removed the extra new line at the end of files printed to
stdout. I wasn't aware of cli-tests, so I didn't change those.

This commit adjust the expected output of files formated and printed to
stdout.
@codecov-io
Copy link

Codecov Report

Merging #57 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #57   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          97     97           
=====================================
  Hits           97     97

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 d0345e1...72ea572. Read the comment docs.

@BenoitZugmeyer
Copy link
Contributor Author

Finally! I really hate chalk. Please check again the first commit, if it seems OK to you.

@kentcdodds kentcdodds merged commit b8bfe60 into prettier:master May 18, 2017
@kentcdodds
Copy link
Member

Thank you very much!

@BenoitZugmeyer BenoitZugmeyer deleted the fix-broken-cli-tests branch May 18, 2017 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants