// @flow
import htmlBase from './html-base'
const exampleWindowVarPairs = [
['__A__', { a: "" }],
['__B__', 'plop'],
['__C__', true],
['__D__', 666],
]
const expectedWithVars = `
`
const expectedWithSwPath = `
`
const expectedWithoutVars = `
`
const expectedWithAppHtml = `
Hello
`
const expectedWithCss = `
`
const expectedWithHelmet = `
hello
`
test('htmlBase', () => {
expect(htmlBase({ windowVars: exampleWindowVarPairs })).toBe(expectedWithVars)
expect(htmlBase({})).toBe(expectedWithoutVars)
expect(htmlBase({ swPath: '/sw.js' })).toBe(expectedWithSwPath)
expect(htmlBase({ appHtml: 'Hello' })).toBe(expectedWithAppHtml)
expect(htmlBase({ css: 'body { color: red }' })).toBe(expectedWithCss)
expect(
htmlBase({
helmet: {
htmlAttributes: { toString: () => 'lang="en"' },
bodyAttributes: { toString: () => 'foo="foo"' },
title: { toString: () => 'hello' },
meta: { toString: () => '' },
link: { toString: () => '' },
},
}),
).toBe(expectedWithHelmet)
})