Skip to content

Commit

Permalink
add test for size based on height
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiequach committed Nov 22, 2023
1 parent 6cc6455 commit 6254b70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Image/Image.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ describe("Image", () => {
const sizeLarge = renderer
.create(<Image src="test.png" alt="" size="large" />)
.toJSON();
const sizeBasedOnHeight = renderer
.create(<Image src="test.png" alt="" size="large" sizeBasedOn="height" />)
.toJSON();
const ratioFourByThree = renderer
.create(<Image src="test.png" alt="" aspectRatio="fourByThree" />)
.toJSON();
Expand Down Expand Up @@ -170,6 +173,7 @@ describe("Image", () => {
expect(sizeSmall).toMatchSnapshot();
expect(sizeMedium).toMatchSnapshot();
expect(sizeLarge).toMatchSnapshot();
expect(sizeBasedOnHeight).toMatchSnapshot();
expect(ratioFourByThree).toMatchSnapshot();
expect(ratioOneByTwo).toMatchSnapshot();
expect(ratioOriginal).toMatchSnapshot();
Expand Down

0 comments on commit 6254b70

Please sign in to comment.