Skip to content

Commit

Permalink
loosen link assertions for metadata test
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed Jun 30, 2023
1 parent 95c8b9c commit 1cef01d
Showing 1 changed file with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,35 @@ export default function Test() {
rel: l.getAttribute('rel'),
sizes: l.getAttribute('sizes'),
}))
).toEqual([
expect.objectContaining({
rel: 'manifest',
href: expect.stringMatching(/^\/_next\/static\/.+\.webmanifest$/),
sizes: null,
}),
expect.objectContaining({
rel: 'icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.ico$/),
sizes: '48x48',
}),
expect.objectContaining({
rel: 'icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.png$/),
sizes: '32x32',
}),
expect.objectContaining({
rel: 'icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.png$/),
sizes: '64x64',
}),
expect.objectContaining({
rel: 'apple-touch-icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.png$/),
sizes: '114x114',
}),
])
).toEqual(
expect.arrayContaining([
expect.objectContaining({
rel: 'manifest',
href: expect.stringMatching(/^\/_next\/static\/.+\.webmanifest$/),
sizes: null,
}),
expect.objectContaining({
rel: 'icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.ico$/),
sizes: '48x48',
}),
expect.objectContaining({
rel: 'icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.png$/),
sizes: '32x32',
}),
expect.objectContaining({
rel: 'icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.png$/),
sizes: '64x64',
}),
expect.objectContaining({
rel: 'apple-touch-icon',
href: expect.stringMatching(/^\/_next\/static\/.+\.png$/),
sizes: '114x114',
}),
])
)
})

it('should have the correct meta tags', () => {
Expand Down

0 comments on commit 1cef01d

Please sign in to comment.