Skip to content

Commit 39354ea

Browse files
committed
Add extra test
Related to remarkjs/remark-gfm#8.
1 parent d393b86 commit 39354ea

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

test/index.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,51 @@ test('markdown -> mdast', function (t) {
118118
'should support autolink literals'
119119
)
120120

121+
t.deepEqual(
122+
fromMarkdown('[https://google.com](https://google.com)', {
123+
extensions: [syntax],
124+
mdastExtensions: [autolinkLiterals.fromMarkdown]
125+
}),
126+
{
127+
type: 'root',
128+
children: [
129+
{
130+
type: 'paragraph',
131+
children: [
132+
{
133+
type: 'link',
134+
title: null,
135+
url: 'https://google.com',
136+
children: [
137+
{
138+
type: 'text',
139+
value: 'https://google.com',
140+
position: {
141+
start: {line: 1, column: 2, offset: 1},
142+
end: {line: 1, column: 20, offset: 19}
143+
}
144+
}
145+
],
146+
position: {
147+
start: {line: 1, column: 1, offset: 0},
148+
end: {line: 1, column: 41, offset: 40}
149+
}
150+
}
151+
],
152+
position: {
153+
start: {line: 1, column: 1, offset: 0},
154+
end: {line: 1, column: 41, offset: 40}
155+
}
156+
}
157+
],
158+
position: {
159+
start: {line: 1, column: 1, offset: 0},
160+
end: {line: 1, column: 41, offset: 40}
161+
}
162+
},
163+
'should support normal links'
164+
)
165+
121166
t.end()
122167
})
123168

0 commit comments

Comments
 (0)