Skip to content

Conversation

marcosvega91
Copy link
Member

fix #693

What: I have escaped all queries

Why: Because string with special chars should be escaped to be used with regex

How: I have simply called escapeRegExp in getRegExpMatcher

Checklist:

  • Documentation added to the
    docs site
  • Tests
  • Typescript definitions updated
  • Ready to be merged

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c7a6a89:

Sandbox Source
kentcdodds/react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Jul 12, 2020

Codecov Report

Merging #694 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #694   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines          603       603           
  Branches       151       151           
=========================================
  Hits           603       603           
Impacted Files Coverage Δ
src/suggestions.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8c3942...c7a6a89. Read the comment docs.

Copy link
Member

@smeijer smeijer left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks 👍

@smeijer smeijer changed the title fix: escape regex for all suggested queries fix: escape regexps that are used as query suggestion arguments Jul 12, 2020
@smeijer smeijer merged commit aaceea2 into testing-library:master Jul 12, 2020
@kentcdodds
Copy link
Member

🎉 This PR is included in version 7.20.1 🎉

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.

Suggested RegExp should be escaped
3 participants