diff --git a/package.json b/package.json index 689785c..406f363 100644 --- a/package.json +++ b/package.json @@ -48,16 +48,16 @@ "babel-preset-react-hmre": "^1.0.1", "babel-register": "^6.3.13", "cross-env": "^1.0.7", - "enzyme": "^1.2.0", + "enzyme": "^2.2.0", "eslint": "^1.10.3", "eslint-plugin-react": "^3.14.0", "express": "^4.13.3", "jsdom": "^7.2.2", "mocha": "^2.3.4", "mocha-eslint": "^1.0.0", - "react": "^0.14.7", - "react-addons-test-utils": "^0.14.6", - "react-dom": "^0.14.7", + "react": "^15.0.1", + "react-addons-test-utils": "^15.0.1", + "react-dom": "^15.0.1", "rimraf": "^2.5.0", "sinon": "^1.17.2", "tween.js": "^16.3.1", diff --git a/test/portal_spec.js b/test/portal_spec.js index 789e588..b97caa9 100644 --- a/test/portal_spec.js +++ b/test/portal_spec.js @@ -4,8 +4,7 @@ import assert from 'assert'; import {spy} from 'sinon'; import {render, unmountComponentAtNode} from 'react-dom'; import { - mount, - spyLifecycle + mount } from 'enzyme'; describe('react-portal', () => { @@ -168,9 +167,10 @@ describe('react-portal', () => { describe('openByClickOn', () => { it('render should return null if no props.openByClickOn', () => { - spyLifecycle(Portal); + spy(Portal.prototype, 'render'); mount(

Hi

); assert.equal(Portal.prototype.render.returnValue, null); + Portal.prototype.render.restore(); }); it('should render the props.openByClickOn element', () => {