Skip to content

Commit

Permalink
Add regex checks from golang
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Feb 3, 2025
1 parent 5255027 commit 8336bd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/__tests__/Parser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ describe('.parse', () => {

test.concurrent.each(cases)('input %p returns %p', (input, expected) => {
const re = Parser.parse(input, flags)
const parsedRe = dumpRegexp(re)
let parsedRe = null
expect(() => (parsedRe = dumpRegexp(re))).not.toThrow()
if (!expected && expected.length > 0) {
expect(parsedRe).toEqual(expected)
}
Expand Down

0 comments on commit 8336bd2

Please sign in to comment.