mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
feat(v2): improve DocFrontMatter schema validation (#4796)
Co-authored-by: Nam Hoang Le <nam.hoang.le@mgm-tp.com>
This commit is contained in:
parent
0360364570
commit
fa7aa08100
3 changed files with 193 additions and 27 deletions
|
@ -251,9 +251,10 @@ describe('validateBlogPostFrontMatter', () => {
|
|||
testField({
|
||||
fieldName: 'date',
|
||||
validFrontMatters: [
|
||||
// @ts-expect-error: number for test
|
||||
{date: new Date('2020-01-01')},
|
||||
// @ts-expect-error: string for test
|
||||
{date: '2020-01-01'},
|
||||
// @ts-expect-error: string for test
|
||||
{date: '2020'},
|
||||
],
|
||||
invalidFrontMatters: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue