Skip to content

Commit

Permalink
Merge pull request #2401 from newoga/implement-react-addons-test-utils
Browse files Browse the repository at this point in the history
Switch tests to use new react-addons-test-utils package
  • Loading branch information
alitaheri committed Dec 7, 2015
2 parents 91a91ce + c6a4be1 commit 5986097
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"mocha": "^2.2.5",
"phantomjs": "^1.9.17",
"react": "^0.14.0",
"react-addons-test-utils": "^0.14.3",
"react-dom": "^0.14.0",
"react-hot-loader": "^1.2.8",
"react-tap-event-plugin": "^0.2.0",
Expand Down
4 changes: 1 addition & 3 deletions test/checkbox-spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from 'react/addons';
import Checkbox from 'checkbox';
import injectTheme from './fixtures/inject-theme';

const TestUtils = React.addons.TestUtils;

import TestUtils from 'react-addons-test-utils';

describe('Checkbox', () => {
/* eslint-disable max-len */
Expand Down
3 changes: 1 addition & 2 deletions test/date-picker/calendar-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import CalendarToolbar from 'date-picker/calendar-toolbar';
import IconButton from 'icon-button';
import injectTheme from '../fixtures/inject-theme';
import DateTime from 'utils/date-time';

const TestUtils = React.addons.TestUtils;
import TestUtils from 'react-addons-test-utils';

describe(`Calendar`, () => {
let ThemedCalendar;
Expand Down
3 changes: 1 addition & 2 deletions test/dialog-spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react/addons';
import Dialog from 'dialog';
import {spy} from 'sinon';

const TestUtils = React.addons.TestUtils;
import TestUtils from 'react-addons-test-utils';

describe('Dialog', () => {
it('appends a dialog to the document body', () => {
Expand Down
3 changes: 1 addition & 2 deletions test/drop-down-menu-spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react/addons';
import DropDownMenu from 'drop-down-menu';
import injectTheme from './fixtures/inject-theme';

const TestUtils = React.addons.TestUtils;
import TestUtils from 'react-addons-test-utils';

describe('DropDownMenu', () => {
let ThemedDropdownMenu;
Expand Down
2 changes: 1 addition & 1 deletion test/mixin-context-pure-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react/addons';
import ContextPure from 'mixins/context-pure';
import ThemeManager from 'styles/theme-manager';
import DefaultRawTheme from 'styles/raw-themes/light-raw-theme';
import TestUtils from 'react-addons-test-utils';

const TestUtils = React.addons.TestUtils;
const update = React.addons.update;

const GrandChildComponent = React.createClass({
Expand Down
2 changes: 1 addition & 1 deletion test/theming-v12-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const AppBar = require('app-bar');
const RaisedButton = require('raised-button');
const React = require('react');
const TestUtils = React.addons.TestUtils;
const TestUtils = require('react-addons-test-utils');
const ThemeManager = require('styles/theme-manager');
const ThemeDecorator = require('styles/theme-decorator');
const DarkRawTheme = require('styles/raw-themes/dark-raw-theme');
Expand Down

0 comments on commit 5986097

Please sign in to comment.