Skip to content

Commit c77fc7b

Browse files
test: fixed buildGallery tests
1 parent 0072623 commit c77fc7b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

package/src/components/Attachment/__tests__/buildGallery.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('buildGallery', () => {
9797
it('thumbnail size should be smaller than the limits set by sizeConfig', () => {
9898
const bigImage = generateImageAttachment({
9999
image_url:
100-
'https://stream-io.cdn.com/23kn4k2j3n4k2n3k4n23?sig=34k23n4k23nk423&h=*&w=*&resize=*',
100+
'https://us-east.stream-io-cdn.com/23kn4k2j3n4k2n3k4n23?sig=34k23n4k23nk423&h=*&w=*&resize=*',
101101
original_height: 1200,
102102
original_width: 900,
103103
});
@@ -107,13 +107,13 @@ describe('buildGallery', () => {
107107
sizeConfig: defaultSizeConfig,
108108
});
109109
const t1 = tg1[0][0];
110-
expect(t1.url.includes(`h=${PixelRatio.getPixelSizeForLayoutSize(t1.height)}`)).toBe(true);
110+
expect(t1.url.includes(`&h=${PixelRatio.getPixelSizeForLayoutSize(t1.height)}`)).toBe(true);
111111
expect(t1.url.includes(`&w=${PixelRatio.getPixelSizeForLayoutSize(t1.width)}`)).toBe(true);
112112
expect(t1.url.includes(`&resize=clip`)).toBe(true);
113113

114114
const smallImage = generateImageAttachment({
115115
image_url:
116-
'https://stream-io.cdn.com/23kn4k2j3n4k2n3k4n23?sig=34k23n4k23nk423&h=*&w=*&resize=*',
116+
'https://us-east.stream-io-cdn.com/23kn4k2j3n4k2n3k4n23?sig=34k23n4k23nk423&h=*&w=*&resize=*',
117117
original_height: 30,
118118
original_width: 20,
119119
});
@@ -124,7 +124,7 @@ describe('buildGallery', () => {
124124
});
125125

126126
const t2 = tg2[0][0];
127-
expect(t2.url.includes(`h=*`)).toBe(true);
127+
expect(t2.url.includes(`&h=*`)).toBe(true);
128128
expect(t2.url.includes(`&w=*`)).toBe(true);
129129
expect(t2.url.includes(`&resize=*`)).toBe(true);
130130
});

0 commit comments

Comments
 (0)