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

chai-should: don't use Jest's alias names #502

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

kristerkari
Copy link
Contributor

Hello,

When transforming a large codebase, I noticed that when chai syntax is transformed to Jest, the matchers are using alias names instead of the default names.

There is a eslint-plugin-jest rule that can migrate the method names, but it would be good to do that by default.
https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-alias-methods.md

The alias names are possibly also getting removed from Jest (jestjs/jest#13164), so this would be a good way to future proof the code.

ping @skovhus

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (87daaa6) 92.39% compared to head (f9ee6e8) 92.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #502   +/-   ##
=======================================
  Coverage   92.39%   92.39%           
=======================================
  Files          26       26           
  Lines        1934     1934           
  Branches      404      404           
=======================================
  Hits         1787     1787           
  Misses        101      101           
  Partials       46       46           
Impacted Files Coverage Δ
src/transformers/chai-should.ts 94.78% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@skovhus skovhus merged commit 95bd8c4 into skovhus:main Mar 22, 2023
@kristerkari kristerkari deleted the chai-should-use-canonical-names branch March 22, 2023 11:48
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.

None yet

2 participants