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

test: add regression test for quotes #160

Merged
merged 1 commit into from
Mar 15, 2023
Merged

test: add regression test for quotes #160

merged 1 commit into from
Mar 15, 2023

Conversation

snyamathi
Copy link
Contributor

Description

Adds a regression test for marko-js/marko#1912 which passes in 5.4.1 but fails in 5.4.2

Motivation and Context

marko-js/marko#1912

Screenshots (if appropriate):

Checklist:

  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2023

⚠️ No Changeset found

Latest commit: 9166a88

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

│ ││ ││ │ │ │ │ │ ╰─ closeTagEnd(script)
│ ││ ││ │ │ │ │ ╰─ closeTagName "script"
│ ││ ││ │ │ │ ╰─ closeTagStart "</"
│ ││ ││ │ │ ╰─ text "')"
Copy link
Contributor Author

@snyamathi snyamathi Mar 15, 2023

Choose a reason for hiding this comment

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

This end quote here is being swallowed accidentally after #158

AssertionError [ERR_ASSERTION]: src/__tests__/fixtures/placeholder-within-script-within-string/__snapshots__/placeholder-within-script-within-string.actual.txt
      + expected - actual

        │  ││     ╰─ openTagEnd
        │  │╰─ tagName "script"
        ╰─ ╰─ openTagStart
       2╭─ <script>alert('${xyz}')</script>
      - │  ││     ││      │ │    ││ │     ╰─ closeTagEnd(script)
      - │  ││     ││      │ │    ││ ╰─ closeTagName "script"
      - │  ││     ││      │ │    │╰─ closeTagStart "</"
      - │  ││     ││      │ │    ╰─ text
      + │  ││     ││      │ │   │ │ │     ╰─ closeTagEnd(script)
      + │  ││     ││      │ │   │ │ ╰─ closeTagName "script"
      + │  ││     ││      │ │   │ ╰─ closeTagStart "</"
      + │  ││     ││      │ │   ╰─ text "')"
        │  ││     ││      │ ╰─ placeholder:escape.value "xyz"
        │  ││     ││      ╰─ placeholder:escape "${xyz}"
        │  ││     │╰─ text "alert('"
        │  ││     ╰─ openTagEnd

@DylanPiercey
Copy link
Contributor

Really appreciate this, thank you!

@DylanPiercey DylanPiercey merged commit 7a345a8 into marko-js:main Mar 15, 2023
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