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

chore: update dedent dep #1410

Merged
merged 2 commits into from
Aug 18, 2023
Merged

chore: update dedent dep #1410

merged 2 commits into from
Aug 18, 2023

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jul 31, 2023

See dmnd/dedent#65 (comment)

However, this change actually exposed a false negative in the test. Using manual string gives the same error.

    {
      code:
        'const x = "snapshot";' +
        '\n' +
        'expect(1).toMatchSnapshot(`my ${x}`);',
      options: ['always'],
    },

(with eslint removing escapes).

I think this is by design.

node.quasis.length === 1 && // bail out if not simple
(value === undefined || node.quasis[0].value.raw === value);

We explicitly bail if there are arguments in the template string.

Closes #1411

@SimenB SimenB requested a review from G-Rath July 31, 2023 07:48
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah tbh the tests with escaped interpolation have confused me when I previously looked at them... 😅

@SimenB SimenB merged commit eb32387 into main Aug 18, 2023
21 checks passed
@SimenB SimenB deleted the update-dedent branch August 18, 2023 10:19
@github-actions
Copy link

🎉 This PR is included in version 27.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants