@@ -16,29 +16,29 @@ var toH = require('.')
1616
1717var processor = rehype ( ) . data ( 'settings' , { fragment : true , position : false } )
1818
19- test ( 'hast-to-hyperscript' , function ( t ) {
19+ test ( 'hast-to-hyperscript' , function ( t ) {
2020 var hast
2121
2222 t . equal ( typeof toH , 'function' , 'should expose a function' )
2323
24- t . test ( 'should throw if not given h' , function ( st ) {
25- t . throws ( function ( ) {
24+ t . test ( 'should throw if not given h' , function ( st ) {
25+ t . throws ( function ( ) {
2626 toH ( null , u ( 'element' ) )
2727 } , / h i s n o t a f u n c t i o n / )
2828
2929 st . end ( )
3030 } )
3131
32- t . test ( 'should throw if not given a node' , function ( st ) {
33- t . throws ( function ( ) {
32+ t . test ( 'should throw if not given a node' , function ( st ) {
33+ t . throws ( function ( ) {
3434 toH ( h )
3535 } , / E x p e c t e d r o o t o r e l e m e n t , n o t ` u n d e f i n e d ` / )
3636
37- t . throws ( function ( ) {
37+ t . throws ( function ( ) {
3838 toH ( h , u ( 'text' , 'Alpha' ) )
3939 } , / E r r o r : E x p e c t e d r o o t o r e l e m e n t , n o t ` t e x t ` / )
4040
41- t . throws ( function ( ) {
41+ t . throws ( function ( ) {
4242 toH ( h , u ( 'text' , 'value' ) )
4343 } , / E x p e c t e d r o o t o r e l e m e n t / )
4444
@@ -147,7 +147,7 @@ test('hast-to-hyperscript', function(t) {
147147 '</div>'
148148 ] . join ( '' )
149149
150- t . test ( 'should support `hyperscript`' , function ( st ) {
150+ t . test ( 'should support `hyperscript`' , function ( st ) {
151151 // `hyperscript` does not support SVG (camelcased props).
152152 var baseline = doc . replace ( / v i e w B o x / , 'viewbox' )
153153 var actual = toH ( h , hast )
@@ -185,7 +185,7 @@ test('hast-to-hyperscript', function(t) {
185185 st . end ( )
186186 } )
187187
188- t . test ( 'should support `virtual-dom/h`' , function ( st ) {
188+ t . test ( 'should support `virtual-dom/h`' , function ( st ) {
189189 var baseline = doc . replace ( / c o l o r : r e d ; / , 'color: red' )
190190 var actual = toH ( v , hast )
191191 var expected = v ( 'div' , { key : 'h-1' } , [
@@ -253,7 +253,9 @@ test('hast-to-hyperscript', function(t) {
253253 st . end ( )
254254 } )
255255
256- t . test ( 'should support `React.createElement` in `development`' , function ( st ) {
256+ t . test ( 'should support `React.createElement` in `development`' , function (
257+ st
258+ ) {
257259 var currentEnv = process . env . NODE_ENV
258260 var baseline = doc . replace ( / c o l o r : r e d ; / , 'color:red' )
259261 process . env . NODE_ENV = 'development'
@@ -321,7 +323,7 @@ test('hast-to-hyperscript', function(t) {
321323 st . end ( )
322324 } )
323325
324- t . test ( 'should support `React.createElement` in `production`' , function ( st ) {
326+ t . test ( 'should support `React.createElement` in `production`' , function ( st ) {
325327 var currentEnv = process . env . NODE_ENV
326328 var baseline = doc . replace ( / c o l o r : r e d ; / , 'color:red' )
327329 process . env . NODE_ENV = 'production'
@@ -388,15 +390,15 @@ test('hast-to-hyperscript', function(t) {
388390 st . end ( )
389391 } )
390392
391- t . test ( 'should support `Vue`' , function ( st ) {
393+ t . test ( 'should support `Vue`' , function ( st ) {
392394 var baseline = doc . replace ( / < d i v > / , '<div data-server-rendered="true">' )
393395 var actual
394396 var expected
395397
396398 st . plan ( 3 )
397399
398400 Promise . all ( [ vueToString ( actualRender ) , vueToString ( expectedRender ) ] )
399- . then ( function ( all ) {
401+ . then ( function ( all ) {
400402 var actualString = all [ 0 ]
401403 var expectedString = all [ 0 ]
402404
@@ -409,7 +411,7 @@ test('hast-to-hyperscript', function(t) {
409411 'equal output baseline'
410412 )
411413 } )
412- . catch ( function ( error ) {
414+ . catch ( function ( error ) {
413415 st . ifErr ( error , 'did not expect an error' )
414416 } )
415417
@@ -501,7 +503,7 @@ test('hast-to-hyperscript', function(t) {
501503 }
502504 } )
503505
504- t . test ( 'should support keys' , function ( st ) {
506+ t . test ( 'should support keys' , function ( st ) {
505507 st . equal (
506508 toH ( h , u ( 'element' , { tagName : 'div' } ) ) . key ,
507509 undefined ,
@@ -561,7 +563,7 @@ test('hast-to-hyperscript', function(t) {
561563 )
562564
563565 st . throws (
564- function ( ) {
566+ function ( ) {
565567 toH (
566568 r ,
567569 u ( 'element' , {
@@ -570,7 +572,7 @@ test('hast-to-hyperscript', function(t) {
570572 } )
571573 )
572574 } ,
573- / ^ E r r o r : d i v \[ s t y l e \ ]: 1 : 1 2 : E n d o f c o m m e n t m i s s i n g $ / ,
575+ / ^ E r r o r : d i v \[ s t y l e ] :1 : 1 2 : E n d o f c o m m e n t m i s s i n g $ / ,
574576 'react: should ignore invalid style declarations'
575577 )
576578
@@ -601,7 +603,7 @@ test('hast-to-hyperscript', function(t) {
601603 st . end ( )
602604 } )
603605
604- t . test ( 'should support space' , function ( st ) {
606+ t . test ( 'should support space' , function ( st ) {
605607 st . equal (
606608 toH ( v , u ( 'element' , { tagName : 'div' } ) ) . namespace ,
607609 null ,
@@ -623,7 +625,7 @@ test('hast-to-hyperscript', function(t) {
623625 st . end ( )
624626 } )
625627
626- t . test ( 'flattens a `root` with one element to that child' , function ( st ) {
628+ t . test ( 'flattens a `root` with one element to that child' , function ( st ) {
627629 var actual = toH (
628630 h ,
629631 u ( 'root' , [ u ( 'element' , { tagName : 'h1' , properties : { id : 'a' } } , [ ] ) ] )
@@ -636,7 +638,7 @@ test('hast-to-hyperscript', function(t) {
636638 st . end ( )
637639 } )
638640
639- t . test ( 'flattens a `root` without children to a `div`' , function ( st ) {
641+ t . test ( 'flattens a `root` without children to a `div`' , function ( st ) {
640642 var actual = toH ( h , u ( 'root' , [ ] ) )
641643 var expected = h ( 'div' )
642644 var doc = '<div></div>'
@@ -646,7 +648,7 @@ test('hast-to-hyperscript', function(t) {
646648 st . end ( )
647649 } )
648650
649- t . test ( 'flattens a `root` with a text child to a `div`' , function ( st ) {
651+ t . test ( 'flattens a `root` with a text child to a `div`' , function ( st ) {
650652 var actual = toH ( h , u ( 'root' , [ u ( 'text' , 'Alpha' ) ] ) )
651653 var expected = h ( 'div' , 'Alpha' )
652654 var doc = '<div>Alpha</div>'
@@ -656,7 +658,7 @@ test('hast-to-hyperscript', function(t) {
656658 st . end ( )
657659 } )
658660
659- t . test ( 'flattens a `root` with more children to a `div`' , function ( st ) {
661+ t . test ( 'flattens a `root` with more children to a `div`' , function ( st ) {
660662 var actual = toH (
661663 h ,
662664 u ( 'root' , [
@@ -672,7 +674,7 @@ test('hast-to-hyperscript', function(t) {
672674 st . end ( )
673675 } )
674676
675- t . test ( 'should support mapping to React properties' , function ( st ) {
677+ t . test ( 'should support mapping to React properties' , function ( st ) {
676678 var actual = toH (
677679 r ,
678680 u (
@@ -707,7 +709,7 @@ test('hast-to-hyperscript', function(t) {
707709 st . end ( )
708710 } )
709711
710- t . test ( 'should use a node as a rendering context' , function ( st ) {
712+ t . test ( 'should use a node as a rendering context' , function ( st ) {
711713 function mockR ( ) {
712714 return {
713715 node : this
0 commit comments