File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
examples/todomvc/components Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Header extends Component {
12
12
return (
13
13
< header className = "header" >
14
14
< h1 > todos</ h1 >
15
- < TodoTextInput newTodo = { true }
15
+ < TodoTextInput newTodo
16
16
onSave = { this . handleSave . bind ( this ) }
17
17
placeholder = "What needs to be done?" />
18
18
</ header >
Original file line number Diff line number Diff line change 55
55
"babel-core" : " ^5.6.18" ,
56
56
"babel-eslint" : " ^4.1.0" ,
57
57
"babel-loader" : " ^5.1.4" ,
58
- "contextify" : " ^0.1.14" ,
59
58
"eslint" : " ^1.2.1" ,
60
59
"eslint-config-airbnb" : " 0.0.8" ,
61
60
"eslint-plugin-react" : " ^3.2.3" ,
Original file line number Diff line number Diff line change 1
1
import expect from 'expect' ;
2
2
import isPlainObject from '../../src/utils/isPlainObject' ;
3
- import contextify from 'contextify ' ;
3
+ import vm from 'vm ' ;
4
4
5
5
describe ( 'isPlainObject' , ( ) => {
6
6
it ( 'should return true only if plain object' , ( ) => {
7
7
function Test ( ) {
8
8
this . prop = 1 ;
9
9
}
10
10
11
- const sandbox = contextify ( ) ;
12
- sandbox . run ( 'var fromAnotherRealm = {};' ) ;
11
+ const sandbox = { fromAnotherRealm : false } ;
12
+ vm . runInNewContext ( ' fromAnotherRealm = {}' , sandbox ) ;
13
13
14
14
expect ( isPlainObject ( sandbox . fromAnotherRealm ) ) . toBe ( true ) ;
15
15
expect ( isPlainObject ( new Test ( ) ) ) . toBe ( false ) ;
@@ -18,7 +18,5 @@ describe('isPlainObject', () => {
18
18
expect ( isPlainObject ( null ) ) . toBe ( false ) ;
19
19
expect ( isPlainObject ( ) ) . toBe ( false ) ;
20
20
expect ( isPlainObject ( { 'x' : 1 , 'y' : 2 } ) ) . toBe ( true ) ;
21
-
22
- sandbox . dispose ( ) ;
23
21
} ) ;
24
22
} ) ;
You can’t perform that action at this time.
0 commit comments