Skip to content

Commit

Permalink
Only test iterable when Symbol.iterator exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dail authored and Brandon Dail committed Sep 14, 2016
1 parent 51e294e commit 3cf0488
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/ReactWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
render,
ReactWrapper,
} from '../src';
import { ITERATOR_SYMBOL } from '../src/Utils';
import { REACT013, REACT014, REACT15 } from '../src/version';

describeWithDOM('mount', () => {
Expand Down Expand Up @@ -3045,7 +3046,7 @@ describeWithDOM('mount', () => {
});
});

describe('@@iterator', () => {
describeIf(ITERATOR_SYMBOL, '@@iterator', () => {
it('should be iterable', () => {
class Foo extends React.Component {
render() {
Expand Down
3 changes: 2 additions & 1 deletion test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import sinon from 'sinon';

import { shallow, render, ShallowWrapper } from '../src/';
import { describeIf, itIf, itWithData, generateEmptyRenderData } from './_helpers';
import { ITERATOR_SYMBOL } from '../src/Utils';
import { REACT013, REACT15 } from '../src/version';

describe('shallow', () => {
Expand Down Expand Up @@ -3585,7 +3586,7 @@ describe('shallow', () => {
});
});

describe('@@iterator', () => {
describeIf(ITERATOR_SYMBOL, '@@iterator', () => {
it('should be iterable', () => {
class Foo extends React.Component {
render() {
Expand Down

0 comments on commit 3cf0488

Please sign in to comment.