Skip to content

Commit

Permalink
fix(toml): integration test file, add check test
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Mar 15, 2021
1 parent bb6884a commit bc42567
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/pass/toml.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Includes TOML support"
description = "Curabitur id vulputate ex. Donec ac faucibus quam, lobortis volutpat tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada non."
slug: "toml"
slug = "toml"
+++

Hello Toml
13 changes: 13 additions & 0 deletions test/seocheck.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,24 @@ slug: much-too-long-indeed
content`

const toml = `+++
title = "hello"
description = "world"
slug = "hello"
+++
content`

test('check() should validate seo requirements', () => {
const actual = check({ name: 'test.md', content: validMd })
expect(actual).toEqual({ file: 'test.md', ok: true })
})

test('check() work with TOML', () => {
const actual = check({ name: 'toml.md', content: toml })
expect(actual).toEqual({ file: 'toml.md', ok: true })
})

test('check() should error on missing seo requirements', () => {
const actual = check({ name: 'test.md', content: errMd })
expect(actual).toEqual({
Expand Down

0 comments on commit bc42567

Please sign in to comment.