expect(html).to.contain('<style class="custom-css-style">' + css + '</style>')
const htmlConfig: HTMLServerConfig = omit(config, 'signup')
- expect(html).to.contain(`<script type="application/javascript">window.PeerTubeServerConfig = '${JSON.stringify(htmlConfig)}'</script>`)
+ const configObjectString = JSON.stringify(htmlConfig)
+ const configEscapedString = JSON.stringify(configObjectString)
+
+ expect(html).to.contain(`<script type="application/javascript">window.PeerTubeServerConfig = ${configEscapedString}</script>`)
}
describe('Test a client controllers', function () {
}
}
})
+
+ it('Should add noindex header for some paths', async function () {
+ const paths = [ '/about/peertube' ]
+
+ for (const path of paths) {
+ const { headers } = await makeHTMLRequest(servers[0].url, path)
+
+ expect(headers['x-robots-tag']).to.equal('noindex')
+ }
+ })
})
describe('Embed HTML', function () {