Commit 77f5dfd3 authored by Dave Pisek's avatar Dave Pisek

Review feedback: Remove getByText regex

parent e0e316fc
......@@ -44,10 +44,11 @@ describe('Vulnerability Report', () => {
it("displays the vulnerability's severity", () => {
const severitySection = screen.getByTestId('severity');
const severityValue = within(severitySection).getByTestId('value');
expect(
within(severitySection).getByText(new RegExp(mockVulnerability.severity, 'i')),
).toBeInstanceOf(HTMLElement);
expect(severityValue.textContent.toLowerCase()).toContain(
mockVulnerability.severity.toLowerCase(),
);
});
it("displays a heading containing the vulnerability's title", () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment