json-theme-even-fork/test/render.js

25 lines
557 B
JavaScript
Raw Normal View History

const { test } = require('tap')
const { HtmlValidate } = require('html-validate')
const { render } = require('..')
2020-08-29 22:40:18 +02:00
const resume = require('resume-schema/sample.resume.json')
test('renders a resume', t => {
t.matchSnapshot(render(resume))
t.end()
})
test('renders valid HTML', t => {
const htmlvalidate = new HtmlValidate({
2021-02-14 15:18:58 +01:00
extends: ['html-validate:recommended'],
rules: { 'svg-focusable': 'off' },
})
const {
results: [{ messages } = {}],
} = htmlvalidate.validateString(render(resume))
t.is(messages, undefined)
t.end()
})