Skip to content

Commit

Permalink
Import fakeDynamicImport from enzyme-adapter-utils
Browse files Browse the repository at this point in the history
Change the import from `enzyme-test-utils/src/Utils` to
`enzyme-test-utils`.

The test results are same in both way. But the coverage is broken
when we import from `enzyme-test-utils/src/Utils`. I'm not sure
why but maybe this breaks the tested lines / branch computation
in nyc.
  • Loading branch information
chenesan committed Apr 21, 2019
1 parent 3139d43 commit e60788c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/enzyme-test-suite/test/Adapter-spec.jsx
Expand Up @@ -9,8 +9,7 @@ import {
} from 'react-is';
import PropTypes from 'prop-types';
import wrap from 'mocha-wrap';
import { wrapWithWrappingComponent, RootFinder } from 'enzyme-adapter-utils';
import { fakeDynamicImport } from 'enzyme-adapter-utils/src/Utils';
import { fakeDynamicImport, wrapWithWrappingComponent, RootFinder } from 'enzyme-adapter-utils';

import './_helpers/setupAdapters';
import Adapter from './_helpers/adapter';
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Expand Up @@ -14,7 +14,7 @@ import {
withSetStateAllowed,
} from 'enzyme/build/Utils';
import getAdapter from 'enzyme/build/getAdapter';
import { fakeDynamicImport } from 'enzyme-adapter-utils/src/Utils';
import { fakeDynamicImport } from 'enzyme-adapter-utils';

import './_helpers/setupAdapters';
import {
Expand Down
@@ -1,4 +1,4 @@
import { fakeDynamicImport } from 'enzyme-adapter-utils/src/Utils';
import { fakeDynamicImport } from 'enzyme-adapter-utils';
import { lazy } from './react-compat';
import { is, VERSION } from './version';

Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-test-suite/test/staticRender-spec.jsx
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { expect } from 'chai';
import { render } from 'enzyme';
import renderEntry from 'enzyme/render';
import { fakeDynamicImport } from 'enzyme-adapter-utils/src/Utils';
import { fakeDynamicImport } from 'enzyme-adapter-utils';

import './_helpers/setupAdapters';
import { describeWithDOM, describeIf } from './_helpers';
Expand Down

0 comments on commit e60788c

Please sign in to comment.