Skip to content

Commit 14e4c5f

Browse files
committed
test: update tests
1 parent d792e1e commit 14e4c5f

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

test/providers.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,77 +7,77 @@ export const images = [
77
fastly: { url: '/test.png' },
88
glide: { url: '/test.png' },
99
imgix: { url: '/test.png' },
10-
unsplash: { url: '/photo-1606112219348-204d7d8b94ee' },
10+
unsplash: { url: '/test.png' },
1111
imagekit: { url: '/test.png' },
1212
netlify: { url: '/test.png' },
1313
prismic: { url: '/test.png?auto=compress,format&rect=0,0,200,200&w=100&h=100' },
1414
sanity: { url: 'https://cdn.sanity.io/images/projectid/production/test-300x450.png?auto=format' }
1515
},
1616
{
1717
args: ['/test.png', { width: 200 }],
18-
ipx: { url: '/_ipx/test.png?w=200' },
18+
ipx: { url: '/_ipx/w_200/test.png' },
1919
cloudinary: { url: '/f_auto,q_auto,w_200/test' },
2020
twicpics: { url: '/test.png?twic=v1/cover=200x-' },
2121
fastly: { url: '/test.png?width=200' },
2222
glide: { url: '/test.png?w=200' },
2323
imgix: { url: '/test.png?w=200' },
24-
unsplash: { url: '/photo-1606112219348-204d7d8b94ee?w=200' },
24+
unsplash: { url: '/test.png?w=200' },
2525
imagekit: { url: '/test.png?tr=w-200' },
2626
netlify: { url: '/test.png?w=200&nf_resize=fit' },
2727
prismic: { url: '/test.png?auto=compress,format&rect=0,0,200,200&w=200&h=100' },
2828
sanity: { url: 'https://cdn.sanity.io/images/projectid/production/test-300x450.png?w=200&auto=format' }
2929
},
3030
{
3131
args: ['/test.png', { height: 200 }],
32-
ipx: { url: '/_ipx/test.png?h=200' },
32+
ipx: { url: '/_ipx/h_200/test.png' },
3333
cloudinary: { url: '/f_auto,q_auto,h_200/test' },
3434
twicpics: { url: '/test.png?twic=v1/cover=-x200' },
3535
fastly: { url: '/test.png?height=200' },
3636
glide: { url: '/test.png?h=200' },
3737
imgix: { url: '/test.png?h=200' },
38-
unsplash: { url: '/photo-1606112219348-204d7d8b94ee?h=200' },
38+
unsplash: { url: '/test.png?h=200' },
3939
imagekit: { url: '/test.png?tr=h-200' },
4040
netlify: { url: '/test.png?h=200&nf_resize=fit' },
4141
prismic: { url: '/test.png?auto=compress,format&rect=0,0,200,200&w=100&h=200' },
4242
sanity: { url: 'https://cdn.sanity.io/images/projectid/production/test-300x450.png?h=200&auto=format' }
4343
},
4444
{
4545
args: ['/test.png', { width: 200, height: 200 }],
46-
ipx: { url: '/_ipx/test.png?s=200_200' },
46+
ipx: { url: '/_ipx/s_200x200/test.png' },
4747
cloudinary: { url: '/f_auto,q_auto,w_200,h_200/test' },
4848
twicpics: { url: '/test.png?twic=v1/cover=200x200' },
4949
fastly: { url: '/test.png?width=200&height=200' },
5050
glide: { url: '/test.png?w=200&h=200' },
5151
imgix: { url: '/test.png?w=200&h=200' },
52-
unsplash: { url: '/photo-1606112219348-204d7d8b94ee?w=200&h=200' },
52+
unsplash: { url: '/test.png?w=200&h=200' },
5353
imagekit: { url: '/test.png?tr=w-200,h-200' },
5454
netlify: { url: '/test.png?w=200&h=200&nf_resize=fit' },
5555
prismic: { url: '/test.png?auto=compress,format&rect=0,0,200,200&w=200&h=200' },
5656
sanity: { url: 'https://cdn.sanity.io/images/projectid/production/test-300x450.png?w=200&h=200&auto=format' }
5757
},
5858
{
5959
args: ['/test.png', { width: 200, height: 200, fit: 'contain' }],
60-
ipx: { url: '/_ipx/test.png?fit=contain&s=200_200' },
60+
ipx: { url: '/_ipx/fit_contain,s_200x200/test.png' },
6161
cloudinary: { url: '/f_auto,q_auto,w_200,h_200,c_scale/test' },
6262
twicpics: { url: '/test.png?twic=v1/contain=200x200' },
6363
fastly: { url: '/test.png?width=200&height=200&fit=bounds' },
6464
glide: { url: '/test.png?w=200&h=200&fit=contain' },
6565
imgix: { url: '/test.png?w=200&h=200&fit=fill' },
66-
unsplash: { url: '/photo-1606112219348-204d7d8b94ee?w=200&h=200&fit=fill' },
66+
unsplash: { url: '/test.png?w=200&h=200&fit=fill' },
6767
imagekit: { url: '/test.png?tr=w-200,h-200,cm-pad_resize' },
6868
netlify: { url: '/test.png?w=200&h=200&nf_resize=fit' },
6969
prismic: { url: '/test.png?auto=compress,format&rect=0,0,200,200&w=200&h=200&fit=fill' },
7070
sanity: { url: 'https://cdn.sanity.io/images/projectid/production/test-300x450.png?w=200&h=200&fit=fill&auto=format&bg=ffffff' }
7171
},
7272
{
7373
args: ['/test.png', { width: 200, height: 200, fit: 'contain', format: 'jpeg' }],
74-
ipx: { url: '/_ipx/test.png?fit=contain&f=jpeg&s=200_200' },
74+
ipx: { url: '/_ipx/fit_contain,f_jpeg,s_200x200/test.png' },
7575
cloudinary: { url: '/f_jpg,q_auto,w_200,h_200,c_scale/test' },
7676
twicpics: { url: '/test.png?twic=v1/output=jpeg/contain=200x200' },
7777
fastly: { url: '/test.png?width=200&height=200&fit=bounds&format=jpeg' },
7878
glide: { url: '/test.png?w=200&h=200&fit=contain&fm=jpeg' },
7979
imgix: { url: '/test.png?w=200&h=200&fit=fill&fm=jpeg' },
80-
unsplash: { url: '/photo-1606112219348-204d7d8b94ee?w=200&h=200&fit=fill&fm=jpeg' },
80+
unsplash: { url: '/test.png?w=200&h=200&fit=fill&fm=jpeg' },
8181
imagekit: { url: '/test.png?tr=w-200,h-200,cm-pad_resize,f-jpeg' },
8282
netlify: { url: '/test.png?w=200&h=200&nf_resize=fit' },
8383
prismic: { url: '/test.png?auto=compress,format&rect=0,0,200,200&w=200&h=200&fit=fill&fm=jpeg' },

test/unit/config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('undefined config', () => {
88

99
test('defaults to ipx to optimize images', async () => {
1010
const { body } = await get('/')
11-
expect(body).toContain('<img src="/_ipx/2000px-Aconcagua2016.jpg?s=300_200" width="300" height="200">')
11+
expect(body).toContain('<img src="/_ipx/s_300x200/2000px-Aconcagua2016.jpg" width="300" height="200">')
1212
})
1313
})
1414

0 commit comments

Comments
 (0)