Skip to content

Commit

Permalink
Merge pull request #1 from jodylecompte/increase-test-coverage
Browse files Browse the repository at this point in the history
Increase test coverage
  • Loading branch information
rahsheen committed Oct 8, 2018
2 parents 26fde4e + df06cc1 commit 4b7dc58
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,22 @@ describe('Wizard', () => {
expect(node.innerHTML).toContain('React-Wizard')
})
})

it('does not render without children', () => {
render(<Wizard></Wizard>, node, () => {
expect(node.children.length).toBe(0);
})
})

it('does not render future steps', () => {
const structure = (
<Wizard>
<Wizard.Step>{() => <h2>>@rahsheen/React-Wizard</h2>}</Wizard.Step>
<Wizard.Step>{() => <h2>Step 2</h2>}</Wizard.Step>
</Wizard>
)
render(structure, node, () => {
expect(node.innerHTML).toNotContain('Step 2');
})
})
})

0 comments on commit 4b7dc58

Please sign in to comment.