Skip to content

Commit a02be71

Browse files
ctriantafjsamr
authored andcommitted
test: add case for retaining border radius styles
1 parent 7e8b2d2 commit a02be71

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

packages/render-html/src/elements/__tests__/IMGElement.test.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,5 +474,25 @@ describe('IMGElement', () => {
474474
height: 100
475475
});
476476
});
477+
it('should retain border-related style', async () => {
478+
const source = { uri: 'http://via.placeholder.com/640x360' };
479+
const style = {
480+
borderBottomLeftRadius: 10,
481+
borderBottomRightRadius: 10,
482+
borderTopLeftRadius: 10,
483+
borderTopRightRadius: 10
484+
};
485+
const { findByTestId } = render(
486+
<HTMLImgElement source={source} style={style} />
487+
);
488+
const image = await findByTestId('image-success');
489+
expect(image).toBeTruthy();
490+
expect(image).toHaveStyle({
491+
borderBottomLeftRadius: 10,
492+
borderBottomRightRadius: 10,
493+
borderTopLeftRadius: 10,
494+
borderTopRightRadius: 10
495+
});
496+
});
477497
});
478498
});

0 commit comments

Comments
 (0)