Skip to content

Commit

Permalink
Fix test (#523)
Browse files Browse the repository at this point in the history
* First try for typescript support for Divider

* In the middle of using proptables from ts components in the storybook

* Lot's of lot's of tweeks to make prop tables in storybook working. This commit is kind of a proof of concept

* Remove classname, key and ref from props table

* Removed debug env

* Removed configuration of typescript in storybook main

* Remove old testing stuffs

* Remove old rollup typescript plugin

* Delete copy'n pasted babel typescript transpiler, we use rollup plugin instead

* Remove testing stuffs

* Fix test
  • Loading branch information
wenche authored and vnys committed Nov 13, 2020
1 parent b709eb8 commit c690c7b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libraries/core-react/src/Divider/Divider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Divider', () => {
expect(container.firstChild).toHaveStyleRule('margin-top', spacingMedium)
})
it('Sets backgroundColor to light according to color prop', () => {
const { container } = render(<Divider />)
const { container } = render(<Divider color="light" />)
expect(container.firstChild).toHaveStyleRule('background-color', light)
})
it('Sets backgroundColor to lighter according to color prop', () => {
Expand All @@ -41,9 +41,7 @@ describe('Divider', () => {
expect(container.firstChild).toHaveStyleRule('margin-top', spacingSmall)
})
it('Can extend the css for the component', () => {
const { container } = render(
<StyledDivider color="light" variant="small" />,
)
const { container } = render(<StyledDivider variant="small" />)
expect(container.firstChild).toHaveStyleRule('position', 'relative')
expect(container.firstChild).toHaveStyleRule('margin-top', spacingSmall)
})
Expand Down

0 comments on commit c690c7b

Please sign in to comment.