Skip to content

Commit

Permalink
remove broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robinweser committed May 4, 2022
1 parent bfd1bc7 commit 4670258
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,6 @@ describe('Connect Factory for bindings', () => {
expect(createSnapshot(<Comp />)).toMatchSnapshot()
})

it('should pass through "theme" prop into Component', () => {
const rules = {
rule1: () => ({
padding: 1,
}),
rule2: (props) => ({
color: props.color,
}),
}

const InnerComp = jest.fn(() => null)

const Comp = connect(rules)(InnerComp)

const theme = {
primary: 'red',
secondary: 'blue',
}

createSnapshot(<Comp />, theme)

expect(InnerComp).toHaveBeenCalledWith(
{
styles: expect.anything(),
rules: expect.anything(),
theme,
},
expect.anything()
)
expect(InnerComp).toHaveBeenCalledTimes(1)
})

it('should process rules and create classNames with rules as function', () => {
const rules = jest.fn((props) => ({
rule1: {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-react-fela/src/createSnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function renderToMarkup(component) {

export default createSnapshotFactory(
createElement,
renderComponent,
renderToMarkup,
createRenderer(),
RendererProvider,
ThemeProvider
Expand Down

1 comment on commit 4670258

@vercel
Copy link

@vercel vercel bot commented on 4670258 May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.