fix: Add tests to check lazy matching is applied and that the string "h1" is not matched (#38193)
This commit is contained in:
parent
81e751d88b
commit
5feabd762c
@ -26,6 +26,10 @@ Fix the regex <code>/<.*>/</code> to return the HTML tag <code><h1><
|
||||
tests:
|
||||
- text: The <code>result</code> variable should be an array with <code><h1></code> in it
|
||||
testString: assert(result[0] == '<h1>');
|
||||
- text: <code>myRegex</code> should use lazy matching
|
||||
testString: assert(/\?/g.test(myRegex));
|
||||
- text: <code>myRegex</code></code> should not include the string 'h1'
|
||||
testString: assert(!myRegex.source.match('h1'));
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user