@@ -6,12 +6,12 @@ import s from 'hastscript/svg.js'
66import x from 'xastscript'
77import { toXast } from './index.js'
88
9- test ( 'toXast' , function ( t ) {
10- t . test ( 'main' , function ( t ) {
9+ test ( 'toXast' , ( t ) => {
10+ t . test ( 'main' , ( t ) => {
1111 t . equal ( typeof toXast , 'function' , 'should expose a function' )
1212
1313 t . throws (
14- function ( ) {
14+ ( ) => {
1515 // @ts -ignore runtime.
1616 toXast ( )
1717 } ,
@@ -20,7 +20,7 @@ test('toXast', function (t) {
2020 )
2121
2222 t . throws (
23- function ( ) {
23+ ( ) => {
2424 // @ts -ignore well-known.
2525 toXast ( { type : 'raw' , value : '<script>alert(1)</script>' } )
2626 } ,
@@ -69,7 +69,7 @@ test('toXast', function (t) {
6969 t . end ( )
7070 } )
7171
72- t . test ( 'root' , function ( t ) {
72+ t . test ( 'root' , ( t ) => {
7373 t . deepEqual (
7474 toXast ( u ( 'root' , [ h ( 'div' , 'Alpha' ) ] ) ) ,
7575 u ( 'root' , [ x ( 'div' , { xmlns : ns . html } , 'Alpha' ) ] ) ,
@@ -79,7 +79,7 @@ test('toXast', function (t) {
7979 t . end ( )
8080 } )
8181
82- t . test ( 'text' , function ( t ) {
82+ t . test ( 'text' , ( t ) => {
8383 t . deepEqual (
8484 toXast ( u ( 'text' , 'Alpha' ) ) ,
8585 u ( 'text' , 'Alpha' ) ,
@@ -96,7 +96,7 @@ test('toXast', function (t) {
9696 t . end ( )
9797 } )
9898
99- t . test ( 'comment' , function ( t ) {
99+ t . test ( 'comment' , ( t ) => {
100100 t . deepEqual (
101101 toXast ( u ( 'comment' , 'Alpha' ) ) ,
102102 u ( 'comment' , 'Alpha' ) ,
@@ -113,7 +113,7 @@ test('toXast', function (t) {
113113 t . end ( )
114114 } )
115115
116- t . test ( 'doctype' , function ( t ) {
116+ t . test ( 'doctype' , ( t ) => {
117117 t . deepEqual (
118118 // @ts -ignore hast@next.
119119 toXast ( u ( 'doctype' ) ) ,
@@ -124,7 +124,7 @@ test('toXast', function (t) {
124124 t . end ( )
125125 } )
126126
127- t . test ( 'element' , function ( t ) {
127+ t . test ( 'element' , ( t ) => {
128128 t . deepEqual (
129129 toXast ( h ( 'p' , [ h ( 'a' , 'A' ) , ' & ' , h ( 'b' , 'B' ) , '.' ] ) ) ,
130130 x ( 'p' , { xmlns : ns . html } , [ x ( 'a' , 'A' ) , ' & ' , x ( 'b' , 'B' ) , '.' ] ) ,
@@ -167,7 +167,7 @@ test('toXast', function (t) {
167167 t . end ( )
168168 } )
169169
170- t . test ( 'attributes' , function ( t ) {
170+ t . test ( 'attributes' , ( t ) => {
171171 t . deepEqual (
172172 toXast ( u ( 'element' , { tagName : 'br' } , [ ] ) ) ,
173173 x ( 'br' , { xmlns : ns . html } ) ,
@@ -303,7 +303,7 @@ test('toXast', function (t) {
303303 t . end ( )
304304 } )
305305
306- t . test ( 'svg' , function ( t ) {
306+ t . test ( 'svg' , ( t ) => {
307307 t . deepEqual (
308308 toXast (
309309 s (
@@ -403,7 +403,7 @@ test('toXast', function (t) {
403403 t . end ( )
404404 } )
405405
406- t . test ( 'mathml' , function ( t ) {
406+ t . test ( 'mathml' , ( t ) => {
407407 t . deepEqual (
408408 toXast (
409409 u ( 'element' , { tagName : 'p' , properties : { } } , [
0 commit comments