Skip to content

Commit

Permalink
Incorrectly parses some regular expressions
Browse files Browse the repository at this point in the history
This adds a failing test for a case where we incorrectly interpret a regular expression as a template tag.
  • Loading branch information
ef4 authored and NullVoxPopuli committed Oct 22, 2023
1 parent ce4c24a commit f332c23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/integration/gjs-test.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@ module('tests/integration/components/gjs', function (hooks) {

assert.equal(this.element.textContent.trim(), 'Hello, world!');
});

test('it is not confused by a template-tag-like regex', async function (assert) {
let pattern = /<template\s*>/;
assert.ok(pattern);
});
});

0 comments on commit f332c23

Please sign in to comment.