Skip to content

Commit 0562916

Browse files
committed
lint fixes
1 parent c74acb4 commit 0562916

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

packages/enzyme-adapter-utils/src/Utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import functionName from 'function.prototype.name';
2-
import createMountWrapper from './createMountWrapper';
3-
import createRenderWrapper from './createRenderWrapper';
42
import {
53
Portal,
64
} from 'react-is';
5+
import createMountWrapper from './createMountWrapper';
6+
import createRenderWrapper from './createRenderWrapper';
77

88
export { createMountWrapper, createRenderWrapper };
99

packages/enzyme-test-suite/test/Adapter-spec.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { expect } from 'chai';
33
import jsdom from 'jsdom';
44
import { get } from 'enzyme/build/configuration';
55
import { configure, shallow } from 'enzyme';
6+
import {
7+
Portal,
8+
} from 'react-is';
69

710
import './_helpers/setupAdapters';
811
import Adapter from './_helpers/adapter';
@@ -16,9 +19,6 @@ import {
1619
AsyncMode,
1720
Profiler,
1821
} from './_helpers/react-compat';
19-
import {
20-
Portal,
21-
} from 'react-is';
2222
import { is } from './_helpers/version';
2323
import { itIf, describeWithDOM, describeIf } from './_helpers';
2424

packages/enzyme-test-suite/test/ReactWrapper-spec.jsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import {
1515
sym,
1616
} from 'enzyme/build/Utils';
1717
import getAdapter from 'enzyme/build/getAdapter';
18+
import {
19+
Portal,
20+
} from 'react-is';
1821

1922
import './_helpers/setupAdapters';
2023
import {
@@ -36,9 +39,6 @@ import {
3639
REACT16,
3740
is,
3841
} from './_helpers/version';
39-
import {
40-
Portal,
41-
} from 'react-is';
4242
import realArrowFunction from './_helpers/realArrowFunction';
4343
import sloppyReturnThis from './_helpers/untranspiledSloppyReturnThis';
4444

@@ -386,11 +386,12 @@ describeWithDOM('mount', () => {
386386

387387
describeIf(is('>= 16'), 'portals', () => {
388388
it('should have portals in mount debug tree', () => {
389+
const containerDiv = global.document.createElement('div');
389390
const Foo = () => (
390391
<div>
391392
{createPortal(
392393
<div className="in-portal">InPortal</div>,
393-
document.body
394+
containerDiv,
394395
)}
395396
</div>
396397
);
@@ -408,9 +409,10 @@ describeWithDOM('mount', () => {
408409
});
409410

410411
it('should have top level portals in mount debug tree', () => {
412+
const containerDiv = global.document.createElement('div');
411413
const Foo = () => createPortal(
412414
<div className="in-portal">InPortal</div>,
413-
document.body
415+
containerDiv,
414416
);
415417

416418
const wrapper = mount(<Foo />);
@@ -1260,11 +1262,12 @@ describeWithDOM('mount', () => {
12601262
});
12611263

12621264
itIf(is('>= 16'), 'should find mounted portals by name', () => {
1265+
const containerDiv = global.document.createElement('div');
12631266
const Foo = () => (
12641267
<div>
12651268
{createPortal(
12661269
<div className="in-portal">InPortal</div>,
1267-
document.body
1270+
containerDiv,
12681271
)}
12691272
</div>
12701273
);
@@ -1600,11 +1603,12 @@ describeWithDOM('mount', () => {
16001603
});
16011604

16021605
itIf(is('>= 16'), 'should find mounted portals by react-is Portal type', () => {
1606+
const containerDiv = global.document.createElement('div');
16031607
const Foo = () => (
16041608
<div>
16051609
{createPortal(
16061610
<div className="in-portal">InPortal</div>,
1607-
document.body
1611+
containerDiv,
16081612
)}
16091613
</div>
16101614
);

0 commit comments

Comments
 (0)