Skip to content

Commit

Permalink
modify react-compat to export functions individually
Browse files Browse the repository at this point in the history
..and restore modules importing from it
  • Loading branch information
lecstor committed Jan 21, 2016
1 parent 318aaaf commit 4d1c91f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/MountedTraversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ import {
AND,
SELECTOR,
} from './Utils';
import reactCompat from './react-compat';
const {
import {
isDOMComponent,
isCompositeComponent,
isCompositeComponentWithType,
isElement,
findDOMNode,
} = reactCompat;
} from './react-compat';


import { REACT013, REACT014 } from './version';
Expand Down
5 changes: 2 additions & 3 deletions src/ShallowWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ import {
treeFilter,
buildPredicate,
} from './ShallowTraversal';
import reactCompat from './react-compat';
const {
import {
createShallowRenderer,
renderToStaticMarkup,
} = reactCompat;
} from './react-compat';

/**
* Finds all nodes in the current wrapper nodes' render trees that match the provided predicate
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import Sinon from 'sinon';
import ReactWrapper from './ReactWrapper';
import ShallowWrapper from './ShallowWrapper';
import { onPrototype } from './Utils';
import reactCompat from './react-compat';
const {renderToStaticMarkup} = reactCompat;
import { renderToStaticMarkup } from './react-compat';

/**
* @class Enzyme
Expand Down
2 changes: 1 addition & 1 deletion src/react-compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const {
findAllInRenderedTree,
} = TestUtils;

export default {
export {
createShallowRenderer,
renderToStaticMarkup,
renderIntoDocument,
Expand Down

0 comments on commit 4d1c91f

Please sign in to comment.