(browser)
| 10 | |
| 11 | // Does the same evaluation checking for INJECTED for 5 seconds after hydration, triggering every 500ms |
| 12 | async function checkInjected(browser) { |
| 13 | const start = Date.now() |
| 14 | while (Date.now() - start < 5000) { |
| 15 | const bodyText = await getBrowserBodyText(browser) |
| 16 | if (/INJECTED/.test(bodyText)) { |
| 17 | throw new Error('Vulnerable to XSS attacks') |
| 18 | } |
| 19 | await waitFor(500) |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | export default (next: NextInstance) => { |
| 24 | describe('With Security Related Issues', () => { |
no test coverage detected