Skip to content

Commit 53f6b4f

Browse files
committed
test: added e2e test for ipx with dir config
1 parent 9a74a67 commit 53f6b4f

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

playground/providers.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ export const providers: Provider[] = [
5858
height: 300,
5959
link: 'https://unsplash.com/@jeremythomasphoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText',
6060
},
61+
{
62+
src: '/images/colors-layer.jpg',
63+
from: 'Jeremy Thomas',
64+
width: 300,
65+
height: 300,
66+
link: 'https://unsplash.com/@jeremythomasphoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText',
67+
},
68+
{
69+
src: '/images/colors-layer-config.jpg',
70+
from: 'Jeremy Thomas',
71+
width: 300,
72+
height: 300,
73+
link: 'https://unsplash.com/@jeremythomasphoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText',
74+
},
6175
{
6276
src: '/images/everest.jpg',
6377
from: 'Mount Everest Wikipedia page (alias)',

test/e2e/__snapshots__/ipx.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
22
"requests": [
3+
"/_ipx/s_300x300/images/colors-layer-config.jpg",
4+
"/_ipx/s_300x300/images/colors-layer.jpg",
35
"/_ipx/s_300x300/images/colors.jpg",
46
"/_ipx/s_300x300/images/everest.jpg",
57
"/_ipx/s_300x300/images/tacos.svg",
68
"/_ipx/s_300x300/unsplash/photo-1606112219348-204d7d8b94ee",
79
],
810
"sources": [
911
"/_ipx/s_300x300/images/colors.jpg",
12+
"/_ipx/s_300x300/images/colors-layer.jpg",
13+
"/_ipx/s_300x300/images/colors-layer-config.jpg",
1014
"/_ipx/s_300x300/images/everest.jpg",
1115
"/_ipx/s_300x300/images/tacos.svg",
1216
"/_ipx/s_300x300/unsplash/photo-1606112219348-204d7d8b94ee",

test/e2e/generate.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ describe('ipx provider', () => {
3535
expect(files.sort()).toMatchInlineSnapshot(`
3636
[
3737
"_ipx/_/images/nuxt.png",
38+
"_ipx/s_300x300/images/colors-layer-config.jpg",
39+
"_ipx/s_300x300/images/colors-layer.jpg",
3840
"_ipx/s_300x300/images/colors.jpg",
3941
"_ipx/s_300x300/images/everest.jpg",
4042
"_ipx/s_300x300/images/tacos.svg",
4143
"_ipx/s_300x300/unsplash/photo-1606112219348-204d7d8b94ee",
44+
"_ipx/s_600x600/images/colors-layer-config.jpg",
45+
"_ipx/s_600x600/images/colors-layer.jpg",
4246
"_ipx/s_600x600/images/colors.jpg",
4347
"_ipx/s_600x600/images/everest.jpg",
4448
"_ipx/s_600x600/images/tacos.svg",

0 commit comments

Comments
 (0)