diff --git a/packages/rrweb-snapshot/test/html/picture.html b/packages/rrweb-snapshot/test/html/picture.html index 2401ca0c61..3d59df428b 100644 --- a/packages/rrweb-snapshot/test/html/picture.html +++ b/packages/rrweb-snapshot/test/html/picture.html @@ -6,5 +6,6 @@ This is a robot + CORS restricted but has access-control-allow-origin: * diff --git a/packages/rrweb-snapshot/test/integration.test.ts b/packages/rrweb-snapshot/test/integration.test.ts index 01c28d71ba..b4695e519a 100644 --- a/packages/rrweb-snapshot/test/integration.test.ts +++ b/packages/rrweb-snapshot/test/integration.test.ts @@ -233,6 +233,14 @@ iframe.contentDocument.querySelector('center').clientHeight rr_dataURL: expect.stringMatching(/^data:image\/webp;base64,/), }, }), + expect.objectContaining({ + tagName: 'img', + attributes: { + src: 'https://avatars.githubusercontent.com/u/43396833?s=20&v=4', + alt: 'CORS restricted but has access-control-allow-origin: *', + rr_dataURL: expect.stringMatching(/^data:image\/webp;base64,/), + }, + }), ]), ); });