Skip to content

Commit

Permalink
test: add test for document title option
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhaenisch committed Sep 24, 2021
1 parent 7464790 commit a1044e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/test/lib.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ test('getHtml should inject body classes', (t) => {
t.regex(html, /<body class="foo bar">/);
});

test('getHtml should have the title set', (t) => {
const html = getHtml('', { ...defaultConfig, document_title: 'Foo' }).replace(/\n/g, '');

t.regex(html, /<title>Foo<\/title>/);
});

// --
// get-marked-with-highlighter
// get-marked

test('getMarked should highlight js code', (t) => {
const marked = getMarked({});
Expand Down

0 comments on commit a1044e0

Please sign in to comment.