Skip to content

Commit 1a4fbb3

Browse files
committed
moar tests
1 parent 71865e3 commit 1a4fbb3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,18 @@ test('matter', async function () {
7474
{matter: {true: false}},
7575
'should pass yaml options (2)'
7676
)
77+
file = new VFile('---\n\n---\n')
78+
matter(file, {yaml: {version: '1.1'}})
79+
assert.deepEqual(
80+
file.data,
81+
{matter: null},
82+
'should not crash on empty frontmatter'
83+
)
7784
file = new VFile('---\n---\n')
7885
matter(file, {yaml: {version: '1.1'}})
7986
assert.deepEqual(
8087
file.data,
81-
{matter: {}},
88+
{matter: null},
8289
'should not crash on empty frontmatter'
8390
)
8491
})

0 commit comments

Comments
 (0)