chore: add test

This commit is contained in:
syy11cn 2022-04-14 00:27:11 +08:00
parent 30ef0a278c
commit f17d4a9fbf
2 changed files with 18 additions and 0 deletions

18
test/parser.test.ts Normal file
View File

@ -0,0 +1,18 @@
import { describe, expect, it } from 'vitest'
import { matter } from '@md-report/parser'
const source = `---
aaa: bbb
ccc: 111
ddd: true
---`
describe('frontmatter', () => {
it('get frontmatter', () => {
expect(matter(source).data).toEqual({
aaa: 'bbb',
ccc: 111,
ddd: true,
})
})
})