Skip to content

Commit 1b2977f

Browse files
committed
Fix tests for changes in micromark extensions
1 parent 8e04732 commit 1b2977f

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

test.js

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -439,32 +439,20 @@ test('markdown -> mdast', function (t) {
439439
'should crash on invalid JS in an attribute expression'
440440
)
441441

442-
t.deepEqual(
443-
removePosition(
442+
t.throws(
443+
function () {
444444
fromMarkdown('a < \t>b</>', {
445-
extensions: [syntax()],
445+
extensions: [syntax({acorn: acorn})],
446446
mdastExtensions: [mdxJsx.fromMarkdown]
447-
}),
448-
true
449-
).children[0],
450-
{
451-
type: 'paragraph',
452-
children: [
453-
{type: 'text', value: 'a '},
454-
{
455-
type: 'mdxJsxTextElement',
456-
name: null,
457-
attributes: [],
458-
children: [{type: 'text', value: 'b'}]
459-
}
460-
]
447+
})
461448
},
462-
'should support whitespace in the opening tag (fragment)'
449+
/Unexpected closing slash `\/` in tag, expected an open tag first/,
450+
'should *not* support whitespace in the opening tag (fragment)'
463451
)
464452

465453
t.deepEqual(
466454
removePosition(
467-
fromMarkdown('a < \nb\t>c</b>', {
455+
fromMarkdown('a <b\t>c</b>', {
468456
extensions: [syntax()],
469457
mdastExtensions: [mdxJsx.fromMarkdown]
470458
}),

0 commit comments

Comments
 (0)