@@ -6,7 +6,7 @@ import {removePosition} from 'unist-util-remove-position'
6
6
import mdxJsx from 'micromark-extension-mdx-jsx'
7
7
import { mdxJsxFromMarkdown , mdxJsxToMarkdown } from './index.js'
8
8
9
- test ( 'markdown -> mdast' , function ( t ) {
9
+ test ( 'markdown -> mdast' , ( t ) => {
10
10
t . deepEqual (
11
11
fromMarkdown ( '<a />' , {
12
12
extensions : [ mdxJsx ( ) ] ,
@@ -152,7 +152,7 @@ test('markdown -> mdast', function (t) {
152
152
)
153
153
154
154
t . throws (
155
- function ( ) {
155
+ ( ) => {
156
156
fromMarkdown ( 'a <b> c' , {
157
157
extensions : [ mdxJsx ( ) ] ,
158
158
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -163,7 +163,7 @@ test('markdown -> mdast', function (t) {
163
163
)
164
164
165
165
t . throws (
166
- function ( ) {
166
+ ( ) => {
167
167
fromMarkdown ( '<a>' , {
168
168
extensions : [ mdxJsx ( ) ] ,
169
169
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -418,7 +418,7 @@ test('markdown -> mdast', function (t) {
418
418
)
419
419
420
420
t . throws (
421
- function ( ) {
421
+ ( ) => {
422
422
fromMarkdown ( 'a <b {1 + 1} /> c' , {
423
423
extensions : [ mdxJsx ( { acorn} ) ] ,
424
424
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -429,7 +429,7 @@ test('markdown -> mdast', function (t) {
429
429
)
430
430
431
431
t . throws (
432
- function ( ) {
432
+ ( ) => {
433
433
fromMarkdown ( 'a <b c={?} /> d' , {
434
434
extensions : [ mdxJsx ( { acorn} ) ] ,
435
435
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -440,7 +440,7 @@ test('markdown -> mdast', function (t) {
440
440
)
441
441
442
442
t . throws (
443
- function ( ) {
443
+ ( ) => {
444
444
fromMarkdown ( 'a < \t>b</>' , {
445
445
extensions : [ mdxJsx ( { acorn} ) ] ,
446
446
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -648,7 +648,7 @@ test('markdown -> mdast', function (t) {
648
648
)
649
649
650
650
t . throws (
651
- function ( ) {
651
+ ( ) => {
652
652
fromMarkdown ( 'a </> c' , {
653
653
extensions : [ mdxJsx ( ) ] ,
654
654
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -659,7 +659,7 @@ test('markdown -> mdast', function (t) {
659
659
)
660
660
661
661
t . throws (
662
- function ( ) {
662
+ ( ) => {
663
663
fromMarkdown ( '</>' , {
664
664
extensions : [ mdxJsx ( ) ] ,
665
665
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -670,7 +670,7 @@ test('markdown -> mdast', function (t) {
670
670
)
671
671
672
672
t . throws (
673
- function ( ) {
673
+ ( ) => {
674
674
fromMarkdown ( 'a <></b>' , {
675
675
extensions : [ mdxJsx ( ) ] ,
676
676
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -680,7 +680,7 @@ test('markdown -> mdast', function (t) {
680
680
'should crash on mismatched tags (1)'
681
681
)
682
682
t . throws (
683
- function ( ) {
683
+ ( ) => {
684
684
fromMarkdown ( 'a <b></>' , {
685
685
extensions : [ mdxJsx ( ) ] ,
686
686
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -690,7 +690,7 @@ test('markdown -> mdast', function (t) {
690
690
'should crash on mismatched tags (2)'
691
691
)
692
692
t . throws (
693
- function ( ) {
693
+ ( ) => {
694
694
fromMarkdown ( 'a <a.b></a>' , {
695
695
extensions : [ mdxJsx ( ) ] ,
696
696
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -700,7 +700,7 @@ test('markdown -> mdast', function (t) {
700
700
'should crash on mismatched tags (3)'
701
701
)
702
702
t . throws (
703
- function ( ) {
703
+ ( ) => {
704
704
fromMarkdown ( 'a <a></a.b>' , {
705
705
extensions : [ mdxJsx ( ) ] ,
706
706
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -710,7 +710,7 @@ test('markdown -> mdast', function (t) {
710
710
'should crash on mismatched tags (4)'
711
711
)
712
712
t . throws (
713
- function ( ) {
713
+ ( ) => {
714
714
fromMarkdown ( 'a <a.b></a.c>' , {
715
715
extensions : [ mdxJsx ( ) ] ,
716
716
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -720,7 +720,7 @@ test('markdown -> mdast', function (t) {
720
720
'should crash on mismatched tags (5)'
721
721
)
722
722
t . throws (
723
- function ( ) {
723
+ ( ) => {
724
724
fromMarkdown ( 'a <a:b></a>' , {
725
725
extensions : [ mdxJsx ( ) ] ,
726
726
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -730,7 +730,7 @@ test('markdown -> mdast', function (t) {
730
730
'should crash on mismatched tags (6)'
731
731
)
732
732
t . throws (
733
- function ( ) {
733
+ ( ) => {
734
734
fromMarkdown ( 'a <a></a:b>' , {
735
735
extensions : [ mdxJsx ( ) ] ,
736
736
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -740,7 +740,7 @@ test('markdown -> mdast', function (t) {
740
740
'should crash on mismatched tags (7)'
741
741
)
742
742
t . throws (
743
- function ( ) {
743
+ ( ) => {
744
744
fromMarkdown ( 'a <a:b></a:c>' , {
745
745
extensions : [ mdxJsx ( ) ] ,
746
746
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -750,7 +750,7 @@ test('markdown -> mdast', function (t) {
750
750
'should crash on mismatched tags (8)'
751
751
)
752
752
t . throws (
753
- function ( ) {
753
+ ( ) => {
754
754
fromMarkdown ( 'a <a:b></a.b>' , {
755
755
extensions : [ mdxJsx ( ) ] ,
756
756
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -761,7 +761,7 @@ test('markdown -> mdast', function (t) {
761
761
)
762
762
763
763
t . throws (
764
- function ( ) {
764
+ ( ) => {
765
765
fromMarkdown ( '<a>b</a/>' , {
766
766
extensions : [ mdxJsx ( ) ] ,
767
767
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -772,7 +772,7 @@ test('markdown -> mdast', function (t) {
772
772
)
773
773
774
774
t . throws (
775
- function ( ) {
775
+ ( ) => {
776
776
fromMarkdown ( '<a>b</a b>' , {
777
777
extensions : [ mdxJsx ( ) ] ,
778
778
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -904,7 +904,7 @@ test('markdown -> mdast', function (t) {
904
904
)
905
905
906
906
t . throws (
907
- function ( ) {
907
+ ( ) => {
908
908
fromMarkdown ( 'a *open <b> close* </b> c.' , {
909
909
extensions : [ mdxJsx ( ) ] ,
910
910
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -915,7 +915,7 @@ test('markdown -> mdast', function (t) {
915
915
)
916
916
917
917
t . throws (
918
- function ( ) {
918
+ ( ) => {
919
919
fromMarkdown ( 'a **open <b> close** </b> c.' , {
920
920
extensions : [ mdxJsx ( ) ] ,
921
921
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -926,7 +926,7 @@ test('markdown -> mdast', function (t) {
926
926
)
927
927
928
928
t . throws (
929
- function ( ) {
929
+ ( ) => {
930
930
fromMarkdown ( 'a [open <b> close](c) </b> d.' , {
931
931
extensions : [ mdxJsx ( ) ] ,
932
932
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -937,7 +937,7 @@ test('markdown -> mdast', function (t) {
937
937
)
938
938
939
939
t . throws (
940
- function ( ) {
940
+ ( ) => {
941
941
fromMarkdown ( 'a  </b> d.' , {
942
942
extensions : [ mdxJsx ( ) ] ,
943
943
mdastExtensions : [ mdxJsxFromMarkdown ]
@@ -1246,7 +1246,7 @@ test('markdown -> mdast', function (t) {
1246
1246
t . end ( )
1247
1247
} )
1248
1248
1249
- test ( 'mdast -> markdown' , function ( t ) {
1249
+ test ( 'mdast -> markdown' , ( t ) => {
1250
1250
t . deepEqual (
1251
1251
toMarkdown ( { type : 'mdxJsxFlowElement' } , { extensions : [ mdxJsxToMarkdown ] } ) ,
1252
1252
'<></>\n' ,
@@ -1288,7 +1288,7 @@ test('mdast -> markdown', function (t) {
1288
1288
)
1289
1289
1290
1290
t . throws (
1291
- function ( ) {
1291
+ ( ) => {
1292
1292
toMarkdown (
1293
1293
{
1294
1294
type : 'mdxJsxFlowElement' ,
@@ -1371,7 +1371,7 @@ test('mdast -> markdown', function (t) {
1371
1371
)
1372
1372
1373
1373
t . throws (
1374
- function ( ) {
1374
+ ( ) => {
1375
1375
toMarkdown (
1376
1376
{
1377
1377
type : 'mdxJsxFlowElement' ,
0 commit comments