diff --git a/examples/todomvc/components/Header.js b/examples/todomvc/components/Header.js index 18b2315743..9c735f3c61 100644 --- a/examples/todomvc/components/Header.js +++ b/examples/todomvc/components/Header.js @@ -12,7 +12,7 @@ class Header extends Component { return (

todos

-
diff --git a/package.json b/package.json index ccd462d550..71bd6d7bba 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "babel-core": "^5.6.18", "babel-eslint": "^4.1.0", "babel-loader": "^5.1.4", - "contextify": "^0.1.14", "eslint": "^1.2.1", "eslint-config-airbnb": "0.0.8", "eslint-plugin-react": "^3.2.3", diff --git a/test/utils/isPlainObject.spec.js b/test/utils/isPlainObject.spec.js index 963c7f610c..435aca87d2 100644 --- a/test/utils/isPlainObject.spec.js +++ b/test/utils/isPlainObject.spec.js @@ -1,6 +1,6 @@ import expect from 'expect'; import isPlainObject from '../../src/utils/isPlainObject'; -import contextify from 'contextify'; +import vm from 'vm'; describe('isPlainObject', () => { it('should return true only if plain object', () => { @@ -8,8 +8,8 @@ describe('isPlainObject', () => { this.prop = 1; } - const sandbox = contextify(); - sandbox.run('var fromAnotherRealm = {};'); + const sandbox = { fromAnotherRealm: false }; + vm.runInNewContext('fromAnotherRealm = {}', sandbox); expect(isPlainObject(sandbox.fromAnotherRealm)).toBe(true); expect(isPlainObject(new Test())).toBe(false); @@ -18,7 +18,5 @@ describe('isPlainObject', () => { expect(isPlainObject(null)).toBe(false); expect(isPlainObject()).toBe(false); expect(isPlainObject({ 'x': 1, 'y': 2 })).toBe(true); - - sandbox.dispose(); }); });