Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgzuke committed Aug 16, 2018
1 parent 6812d3f commit b3d34b4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions packages/enzyme-test-suite/test/ReactWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ describeWithDOM('mount', () => {
});

itIf(is('>= 16'), 'should throw when mounting Portals', () => {
const containerDiv = global.document.createElement('div');
const portal = createPortal(
<div className="in-portal"></div>,
document.body,
<div />,
containerDiv,
);

expect(() => mount(portal)).to.throw(
Expand All @@ -108,7 +109,7 @@ describeWithDOM('mount', () => {
it('should mount composite components', () => {
class Foo extends React.Component {
render() {
return <div className="in-foo"></div>;
return <div />;
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ describe('shallow', () => {

itIf(is('>= 16'), 'should throw when shallow rendering Portals', () => {
const portal = createPortal(
<div className="in-portal"></div>,
document.body,
<div />,
{ nodeType: 1 },
);

expect(() => shallow(portal)).to.throw(
Expand All @@ -105,7 +105,7 @@ describe('shallow', () => {
it('should shallow render composite components', () => {
class Foo extends React.Component {
render() {
return <div className="in-foo"></div>;
return <div />;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme/src/ReactWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ReactWrapper {
if (!root) {
const adapter = getAdapter(options);
if (!adapter.isValidElement(nodes)) {
throw new TypeError('ReactWrapper can only wrap valid elements')
throw new TypeError('ReactWrapper can only wrap valid elements');
}

privateSet(this, UNRENDERED, nodes);
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme/src/ShallowWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class ShallowWrapper {
if (!root) {
const adapter = getAdapter(options);
if (!adapter.isValidElement(nodes)) {
throw new TypeError('ShallowWrapper can only wrap valid elements')
throw new TypeError('ShallowWrapper can only wrap valid elements');
}

privateSet(this, ROOT, this);
Expand Down

0 comments on commit b3d34b4

Please sign in to comment.