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

Support concatenated test titles #12

Closed
ravishivt opened this issue Mar 15, 2019 · 3 comments
Closed

Support concatenated test titles #12

ravishivt opened this issue Mar 15, 2019 · 3 comments

Comments

@ravishivt
Copy link

ravishivt commented Mar 15, 2019

Somewhat related to #1, but this doesn't involve resolving variable names.

When writing tests, I often end up with long test titles. If I break up the test titles into multiple lines of concatenated strings, this plugin fails to match the test to the snapshot. With prettier defaulting to 80 chars per line, it's common in my project to split a test title.

  it(
    `should error if the sun is blue and the moon is green but user doesn't have` +
      ` binoculars or a telescope`,
    async () => {
    ...
    expect(response).toMatchSnapshot();  // fails to show corresponding snapshot
  });
@asvetliakov
Copy link
Owner

Yeah, it becomes binary expression instead of string like literal and the parser doesn't handle it. Should be easy to fix

@ravishivt
Copy link
Author

thanks, works great! 🎉

@asvetliakov
Copy link
Owner

You're welcome! 😄

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

No branches or pull requests

2 participants