Skip to content

Commit

Permalink
Tested interpolation of regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthShyniben committed May 21, 2021
1 parent a2dc141 commit 9d72a02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ it('should build regexes properly', () => {
\s+
`).toStrictEqual(/\d+\s+/);

expect(regex`
// Here's an interpolation
${/\d+\s/g}
/* Here's a nested regex call */
${regex`.*`}
`).toStrictEqual(/\d+\s.*/);

expect(regex`
// Here's an interpolation
Expand Down

0 comments on commit 9d72a02

Please sign in to comment.