test(ui): footer image test refuses protocol-relative sources
This commit is contained in:
1 parent
a8146918b7
commit
1877c4b340
1 file changed
+1
-1
@@ -11,7 +11,7 @@ describe('Footer', () => {
|
|||||||
const sources = screen.getAllByRole('img').map((img) => img.getAttribute('src'))
|
const sources = screen.getAllByRole('img').map((img) => img.getAttribute('src'))
|
||||||
expect(sources).toHaveLength(2)
|
expect(sources).toHaveLength(2)
|
||||||
for (const src of sources) {
|
for (const src of sources) {
|
||||||
expect(src).toMatch(/^\/|^data:|^blob:/)
|
expect(src).toMatch(/^\/(?!\/)|^data:|^blob:/)
|
||||||
expect(src).not.toMatch(/^https?:/)
|
expect(src).not.toMatch(/^https?:/)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user