Skip to content

Commit

Permalink
[Refactor] Use RSTTraversal childrenOfNode in Utils
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyerburgh committed Nov 24, 2017
1 parent 86b66b8 commit 2dce2f3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/enzyme/src/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import entries from 'object.entries';
import functionName from 'function.prototype.name';
import configuration from './configuration';
import validateAdapter from './validateAdapter';
import { childrenOfNode } from './RSTTraversal';

export const ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;

Expand Down Expand Up @@ -181,12 +182,6 @@ export function childrenToSimplifiedArray(nodeChildren) {
return simplifiedArray;
}

function childrenOfNode(node) {
const props = propsOfNode(node);
const { children } = props;
return childrenToArray(children);
}

function isTextualNode(node) {
return typeof node === 'string' || typeof node === 'number';
}
Expand Down

0 comments on commit 2dce2f3

Please sign in to comment.