Skip to content

Commit

Permalink
test : Adds test for Divider and GridFluid component (#127)
Browse files Browse the repository at this point in the history
Co-authored-by: sowmya198 <[email protected]>
  • Loading branch information
sowmya-AS and sowmya-AS authored Oct 31, 2023
1 parent 82a69bd commit b29a542
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/packages/Divider/__snapshots__/test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Divider /> should render Divider correctly 1`] = `
.c0 {
height: 0.01rem;
background: #808080;
border: 0;
}
<div>
<hr
class="c0"
/>
</div>
`;
11 changes: 11 additions & 0 deletions src/packages/Divider/test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'
import { render } from '../../utils/testUtils'

import Divider from '.'

describe('<Divider />', () => {
it('should render Divider correctly', () => {
const { container } = render(<Divider />)
expect(container).toMatchSnapshot()
})
})
18 changes: 18 additions & 0 deletions src/packages/GridFluid/__snapshots__/test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<GridFluid /> should render GridFluid correctly with children 1`] = `
.c0 {
grid-column: 1/4;
width: 100%;
}
<div>
<div
class="c0"
>
<div>
GridFluid
</div>
</div>
</div>
`;
15 changes: 15 additions & 0 deletions src/packages/GridFluid/test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import { render } from '../../utils/testUtils'

import GridFluid from '.'

describe('<GridFluid />', () => {
it('should render GridFluid correctly with children', () => {
const { container } = render(
<GridFluid>
<div>GridFluid</div>
</GridFluid>
)
expect(container).toMatchSnapshot()
})
})

0 comments on commit b29a542

Please sign in to comment.