Skip to content

Commit

Permalink
test top level arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
jgzuke committed Aug 17, 2018
1 parent 6adebf4 commit 4324666
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/enzyme-test-suite/test/ReactWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ describeWithDOM('mount', () => {
);
});

it('should throw when mounting multiple elements', () => {
expect(() => mount([<div />])).to.throw(
TypeError,
'ReactWrapper can only wrap valid elements',
);
});

it('should mount built in components', () => {
expect(() => mount(<div />)).not.to.throw();
});
Expand Down
7 changes: 7 additions & 0 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ describe('shallow', () => {
);
});

it('should throw when shallow rendering multiple elements', () => {
expect(() => shallow([<div />])).to.throw(
TypeError,
'ShallowWrapper can only wrap valid elements',
);
});

it('should shallow render built in components', () => {
expect(() => shallow(<div />)).not.to.throw();
});
Expand Down

0 comments on commit 4324666

Please sign in to comment.