feat(store-header): add fetchpriority and loading attributes to images for performance optimization
This commit is contained in:
@@ -90,6 +90,11 @@ describe('App', () => {
|
||||
expect(
|
||||
document.head.querySelector<HTMLLinkElement>('link[rel~="icon"]')?.getAttribute('href'),
|
||||
).toBe(tenant.favicon);
|
||||
expect(
|
||||
document.head
|
||||
.querySelector<HTMLLinkElement>('link[rel~="icon"]')
|
||||
?.getAttribute('fetchpriority'),
|
||||
).toBe('high');
|
||||
});
|
||||
|
||||
it('renders the tenant not found screen when the tenant is missing', async () => {
|
||||
@@ -114,6 +119,10 @@ describe('App', () => {
|
||||
expect(
|
||||
document.head.querySelector<HTMLLinkElement>('link[rel~="icon"]')?.getAttribute('href'),
|
||||
).toBe("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E");
|
||||
expect(
|
||||
document.head
|
||||
.querySelector<HTMLLinkElement>('link[rel~="icon"]')
|
||||
?.getAttribute('fetchpriority'),
|
||||
).toBe('high');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user