Skip to content

Update jest to v24#6954

Merged
thorn0 merged 9 commits intoprettier:nextfrom
fisker:update-jest
Nov 19, 2019
Merged

Update jest to v24#6954
thorn0 merged 9 commits intoprettier:nextfrom
fisker:update-jest

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented Nov 14, 2019

fixes: #6928

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@alexander-akait
Copy link
Copy Markdown
Member

good job, need look what is problem with CI

@fisker
Copy link
Copy Markdown
Member Author

fisker commented Nov 14, 2019

what is the problem could be

@fisker
Copy link
Copy Markdown
Member Author

fisker commented Nov 15, 2019

strange thing, windows and linux passed, only fails on macOS

@fisker
Copy link
Copy Markdown
Member Author

fisker commented Nov 15, 2019

Should be a toMatch assert bug from jest or jasmine

@fisker fisker force-pushed the update-jest branch 2 times, most recently from 597c244 to 4fdc9ba Compare November 16, 2019 10:25
@fisker fisker changed the title Update jest to v24 [WIP] Update jest to v24 Nov 16, 2019
@fisker fisker mentioned this pull request Nov 16, 2019
4 tasks
@fisker fisker changed the title [WIP] Update jest to v24 Update jest to v24 Nov 16, 2019
@fisker
Copy link
Copy Markdown
Member Author

fisker commented Nov 18, 2019

merge?

@@ -40,11 +41,13 @@ function runPrettierWithLogLevel(logLevel, patterns) {

expect(result).not.toEqual(0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
expect(result).not.toEqual(0);
expect(result.status).not.toEqual(0);

While you're at it, could you also fix this?

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.

drive-by comment: should probably not be negated at all to assert on the actual value instead of what it's not to avoid false negatives such as this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm going to change it to

expect(result.status).toEqual(2);

@thorn0 thorn0 merged commit 320c5cc into prettier:next Nov 19, 2019
@fisker fisker deleted the update-jest branch November 23, 2019 14:16
sosukesuzuki pushed a commit to sosukesuzuki/prettier that referenced this pull request Jan 2, 2020
* Update `jest` to v24

* run test on linux and windows

* fix regexp for macOS

* fix color problem

* restore asserts

* update yarn.lock

* fix status assert
lipis added a commit that referenced this pull request Jan 8, 2020
* 'next' of github.com:prettier/prettier:
  Optimize some usage of `Array#filter` (#6996)
  Update `jest` to v24 (#6954)
  Replace `trim{Left,Right}` with `trim{Start,End}` (#6994)
  Set `trailingComma` default value to `es5` (#6963)
  Fix `new` usage for builtin objects (#6968)
  Replace `indexOf` with `includes` (#6967)
  fix: tests for empty type parameters in TS (#6960)
  Fix MDX html parsing errors (#6949)
  fix: issue #6813 (Zero-based lists are broken) (#6852)
  Style: use async functions (#6935)
  Disable trailingComma for Angular internal parser (#6912)
  Update `snapshot-diff` to v0.6.1 (#6955)
  Update build scripts to target Node.js 10 (#6908)
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants