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-expect conversion failing for and method #171

Open
guidobouman opened this issue Aug 21, 2019 · 1 comment · May be fixed by #217
Open

Chai-expect conversion failing for and method #171

guidobouman opened this issue Aug 21, 2019 · 1 comment · May be fixed by #217

Comments

@guidobouman
Copy link

guidobouman commented Aug 21, 2019

The and method is not supported by Jest, where Chai does support it.

It should probably cut the assertion in two:

- expect(ticketNumber).to.be.above(0).and.to.be.below(46)
+ expect(ticketNumber).toBeGreaterThan(0)
+ expect(ticketNumber).toBeLessThan(46)

Is this a feasible option for codemods?

If so: I'm willing to work on a PR.

@skovhus
Copy link
Owner

skovhus commented Sep 2, 2019

Thanks for reporting this. Would be great to fix this.

You are more than welcome to work on this, that would be awesome. A good first step would be to create a failing test case documenting this issue. Let me know if you need any help. :)

@guidobouman guidobouman changed the title Chai-expect conversion failing for and method Chai-expect conversion failing for and method Jun 9, 2021
@guidobouman guidobouman linked a pull request Jun 9, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants