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

[valid-title]: Title string concatenation #459

Closed
vrizo opened this issue Oct 28, 2019 · 4 comments · Fixed by #461
Closed

[valid-title]: Title string concatenation #459

vrizo opened this issue Oct 28, 2019 · 4 comments · Fixed by #461

Comments

@vrizo
Copy link

vrizo commented Oct 28, 2019

Hi, @SimenB , @G-Rath !

Thanks for the plugin updates! The new valid-title is fantastic, but I faced a couple of problems:

  1. The plugin considers that string concatenation is the wrong title.

I have lots of tests with titles of more than 80 symbols. I use string concatenation. It worked perfectly until I updated the eslint-plugin-jest.

it('doesn’t fit the maximum line length ' +
   '(so I have to write it in two lines)', () => { … })

The new valid-title returns an error:

404:4  error  Title must be a string            jest/valid-title

I suppose it should be OK with string concatenation.

  1. There is no information about this breaking change in releases. I think it’s better to add notification than jest/no-empty-title was removed.

Thanks!

@G-Rath
Copy link
Collaborator

G-Rath commented Oct 28, 2019

hehe I was looking at adding string concat support just this morning - I'll move my schedule up.

It's midnight here, so it'll have to be a tomorrow job I'm afraid. I'll do it now. It's pretty easy: we just need to follow the BinaryExpression nodes up until we have all the string literals.

There is no information about this breaking change in releases. I think it’s better to add notification than jest/no-empty-title was removed.

There should have been, but for some reason our changelog generation didn't pick it up.

I'm in agreement that it should be logged, which is why as you can see in the commit body:

BREAKING CHANEG: delete no-empty-title - use valid-title instead

Either way, it's a major version, so these things happen - we'll update the changelog in post soon :)

@vrizo
Copy link
Author

vrizo commented Oct 28, 2019

Hey, @G-Rath !

Thanks for the quick answer!

It's midnight here

Don't worry about the concatenation, I'm sure it can wait :)

@github-actions
Copy link

🎉 This issue has been resolved in version 23.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@vrizo
Copy link
Author

vrizo commented Oct 28, 2019

It works, thank you!

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