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

Add failing test for a bad codemod: .has.property().to.be.an() #92

Closed
wants to merge 1 commit into from
Closed

Add failing test for a bad codemod: .has.property().to.be.an() #92

wants to merge 1 commit into from

Conversation

sirreal
Copy link
Contributor

@sirreal sirreal commented Nov 13, 2017

This PR adds a failing test exposing the issue in #91 and proposes a better translation.

When applied to real code, this codemod produced a bad result:

expect( state )
  .to.have.property( 'example.wordpress.com' )
  .to.be.a( 'object' );

was translated to:

expect( typeof state ).toBe( 'object' );

Add a test with a proposed codemod result
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.

2 participants