Skip to content

fix(codemod): fix tests failing due to prettier#1555

Merged
jschuler merged 1 commit into
patternfly:masterfrom
redallen:fix/codemod-tests
Mar 12, 2019
Merged

fix(codemod): fix tests failing due to prettier#1555
jschuler merged 1 commit into
patternfly:masterfrom
redallen:fix/codemod-tests

Conversation

@redallen

@redallen redallen commented Mar 12, 2019

Copy link
Copy Markdown
Contributor

What: Remove prettier EOL config option during tests. Tests fail whenever it is specified on *nix-based systems after #1255

Additional issues:

@dlabaj

dlabaj commented Mar 12, 2019

Copy link
Copy Markdown
Contributor

LGTM.

const prettierConfig = {
...prettier.resolveConfig.sync(process.cwd()),
parser: 'babel',
endOfLine: PRETTIER_EOL

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will this work under Windows? I think this was added to support that
https://github.com/patternfly/patternfly-react/pull/1255/files#r251540310

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think our project even builds on Windows currently due to path resolution problems. I'd love to support it in the future and fix things like #478

@redallen redallen Mar 12, 2019

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To answer the question, as long as a Windows machine doesn't convert the line-endings to CRLF in JSCodemod, it will still work.

Edit: But I have no way of testing that right now :(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Okay, not too long ago there was some effort made to support it but I guess without a Windows environment it is difficult to keep this
#1248
#1251

@patternfly-build

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://1555-pr-patternfly-react-patternfly.surge.sh

@codecov-io

codecov-io commented Mar 12, 2019

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@4edacf0). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1555   +/-   ##
=========================================
  Coverage          ?   83.62%           
=========================================
  Files             ?      552           
  Lines             ?     5751           
  Branches          ?       12           
=========================================
  Hits              ?     4809           
  Misses            ?      940           
  Partials          ?        2
Flag Coverage Δ
#patternfly3 84.89% <ø> (?)
#patternfly4 81.4% <ø> (?)

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 4edacf0...df5fc0d. Read the comment docs.

@tlabaj tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@jschuler

Copy link
Copy Markdown
Collaborator

Will create an issue to setup a Win environment possibly to test this going forward

@jschuler jschuler merged commit a937417 into patternfly:master Mar 12, 2019
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.

6 participants