Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Jan 4, 2022
1 parent 8c7183c commit 5a74ed7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/hierarchy/hierarchy-view-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ describe('viewHierarchy', function() {
section: 20,
div: 26,
}, (count, elementName) => {
expect(Array.from(html.matchAll(elementName)).length).toBe(count);
// The next line normally wouldn't be necessary. It is a workaround
// for microsoft/TypeScript#47310.
const pattern = new RegExp(elementName, 'g');
expect(Array.from(html.matchAll(pattern)).length).toBe(count);
});
});

Expand Down

0 comments on commit 5a74ed7

Please sign in to comment.