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 c74acb4 commit 0562916
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/enzyme-adapter-utils/src/Utils.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import functionName from 'function.prototype.name';
import createMountWrapper from './createMountWrapper';
import createRenderWrapper from './createRenderWrapper';
import {
Portal,
} from 'react-is';
import createMountWrapper from './createMountWrapper';
import createRenderWrapper from './createRenderWrapper';

export { createMountWrapper, createRenderWrapper };

Expand Down
6 changes: 3 additions & 3 deletions packages/enzyme-test-suite/test/Adapter-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { expect } from 'chai';
import jsdom from 'jsdom';
import { get } from 'enzyme/build/configuration';
import { configure, shallow } from 'enzyme';
import {
Portal,
} from 'react-is';

import './_helpers/setupAdapters';
import Adapter from './_helpers/adapter';
Expand All @@ -16,9 +19,6 @@ import {
AsyncMode,
Profiler,
} from './_helpers/react-compat';
import {
Portal,
} from 'react-is';
import { is } from './_helpers/version';
import { itIf, describeWithDOM, describeIf } from './_helpers';

Expand Down
18 changes: 11 additions & 7 deletions packages/enzyme-test-suite/test/ReactWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import {
sym,
} from 'enzyme/build/Utils';
import getAdapter from 'enzyme/build/getAdapter';
import {
Portal,
} from 'react-is';

import './_helpers/setupAdapters';
import {
Expand All @@ -36,9 +39,6 @@ import {
REACT16,
is,
} from './_helpers/version';
import {
Portal,
} from 'react-is';
import realArrowFunction from './_helpers/realArrowFunction';
import sloppyReturnThis from './_helpers/untranspiledSloppyReturnThis';

Expand Down Expand Up @@ -386,11 +386,12 @@ describeWithDOM('mount', () => {

describeIf(is('>= 16'), 'portals', () => {
it('should have portals in mount debug tree', () => {
const containerDiv = global.document.createElement('div');
const Foo = () => (
<div>
{createPortal(
<div className="in-portal">InPortal</div>,
document.body
containerDiv,
)}
</div>
);
Expand All @@ -408,9 +409,10 @@ describeWithDOM('mount', () => {
});

it('should have top level portals in mount debug tree', () => {
const containerDiv = global.document.createElement('div');
const Foo = () => createPortal(
<div className="in-portal">InPortal</div>,
document.body
containerDiv,
);

const wrapper = mount(<Foo />);
Expand Down Expand Up @@ -1260,11 +1262,12 @@ describeWithDOM('mount', () => {
});

itIf(is('>= 16'), 'should find mounted portals by name', () => {
const containerDiv = global.document.createElement('div');
const Foo = () => (
<div>
{createPortal(
<div className="in-portal">InPortal</div>,
document.body
containerDiv,
)}
</div>
);
Expand Down Expand Up @@ -1600,11 +1603,12 @@ describeWithDOM('mount', () => {
});

itIf(is('>= 16'), 'should find mounted portals by react-is Portal type', () => {
const containerDiv = global.document.createElement('div');
const Foo = () => (
<div>
{createPortal(
<div className="in-portal">InPortal</div>,
document.body
containerDiv,
)}
</div>
);
Expand Down

0 comments on commit 0562916

Please sign in to comment.