Skip to content

Commit

Permalink
Fixed two warnings on running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri-sakharov committed Dec 19, 2017
1 parent d2a3afd commit 3a3bf6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions test/AsyncCreatable-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ var sinon = require('sinon');
var Select = require('../src');

describe('AsyncCreatable', () => {
let creatableInstance, creatableNode, filterInputNode, loadOptions, renderer;
let creatableInstance, creatableNode, filterInputNode, loadOptions;

beforeEach(() => {
loadOptions = sinon.stub();
renderer = TestUtils.createRenderer();
});

function createControl (props = {}) {
Expand Down
6 changes: 2 additions & 4 deletions test/Creatable-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ var TestUtils = require('react-dom/test-utils');
var Select = require('../src');

describe('Creatable', () => {
let creatableInstance, creatableNode, filterInputNode, innerSelectInstance, renderer;

beforeEach(() => renderer = TestUtils.createRenderer());
let creatableInstance, creatableNode, filterInputNode, innerSelectInstance;

const defaultOptions = [
{ value: 'one', label: 'One' },
Expand Down Expand Up @@ -221,7 +219,7 @@ describe('Creatable', () => {
expect(test(newOption('qux', 4)), 'to be', true);
expect(test(newOption('Foo', 11)), 'to be', true);
});

it('default: isOptionUnique function should always return true if given options are empty', () => {
const options = [];

Expand Down
2 changes: 2 additions & 0 deletions test/Select-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4465,6 +4465,8 @@ describe('Select', () => {
options: defaultOptions,
});
expect(warn, 'was called once');

warn.restore();
});
});
describe('rtl', () => {
Expand Down

0 comments on commit 3a3bf6f

Please sign in to comment.