test: harden visual resource rendering

This commit is contained in:
2026-07-22 19:27:10 +02:00
parent eb15fecb3f
commit 268b7d01fd
3 changed files with 85 additions and 11 deletions

View File

@@ -94,11 +94,8 @@ const page: OneNotePageDto = {
describe('PageReader structured content', () => {
beforeEach(() => {
vi.stubGlobal('URL', {
...URL,
createObjectURL: vi.fn(() => 'blob:local-image'),
revokeObjectURL: vi.fn(),
});
vi.spyOn(URL, 'createObjectURL').mockReturnValue('blob:local-image');
vi.spyOn(URL, 'revokeObjectURL').mockImplementation(() => undefined);
});
it('renders semantic formatting, links, tables, and a signed image resource', async () => {