File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 150150 "update-notifier" : " ^0.7.0"
151151 },
152152 "devDependencies" : {
153+ "babel-preset-react" : " ^6.5.0" ,
153154 "cli-table2" : " ^0.2.0" ,
154155 "coveralls" : " ^2.11.4" ,
155156 "delay" : " ^1.3.0" ,
Original file line number Diff line number Diff line change @@ -650,9 +650,13 @@ function generateTests(prefix, apiCreator) {
650650 } ) ;
651651
652652 test ( prefix + 'power-assert support' , function ( t ) {
653- t . plan ( 3 ) ;
653+ t . plan ( 5 ) ;
654654
655- var api = apiCreator ( ) ;
655+ var api = apiCreator ( {
656+ babelConfig : {
657+ presets : [ 'react' , 'es2015' , 'stage-2' ]
658+ }
659+ } ) ;
656660
657661 api . run ( [ path . join ( __dirname , 'fixture/power-assert.js' ) ] )
658662 . then ( function ( result ) {
@@ -667,6 +671,16 @@ function generateTests(prefix, apiCreator) {
667671 result . errors [ 1 ] . error . message ,
668672 / w i t h m e s s a g e \s + t \. t r u e \( a = = = ' f o o ' , ' w i t h m e s s a g e ' \) \s * \n \s + \| \s * \n \s + " b a r " / m
669673 ) ;
674+
675+ t . match (
676+ result . errors [ 2 ] . error . message ,
677+ / t \. t r u e \( o = = = \{ ...o \} \) \s * \n \s + \| \s * \n \s + O b j e c t \{ \} / m
678+ ) ;
679+
680+ t . match (
681+ result . errors [ 3 ] . error . message ,
682+ / t \. t r u e \( < d i v \/ > = = = < s p a n \/ > \) / m
683+ )
670684 } ) ;
671685 } ) ;
672686
Original file line number Diff line number Diff line change @@ -11,3 +11,15 @@ test.serial(t => {
1111
1212 t . true ( a === 'foo' , 'with message' ) ;
1313} ) ;
14+
15+ test . serial ( t => {
16+ const o = { } ;
17+
18+ t . true ( o === { ...o } ) ;
19+ } ) ;
20+
21+ test . serial ( t => {
22+ const React = { createElement : function ( type ) { return type } }
23+
24+ t . true ( < div /> === < span /> ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments