X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fclient.ts;h=6c32c81db813851dc7184c5796c907dd454db66d;hb=40a8c0a4c4f654ba720ece6219816ad9c4fb9f5e;hp=4f0d052c8abef28f1f5386571bb9de36f77efff8;hpb=421ff4618da64f0849353383f690a014024c40da;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/client.ts b/server/tests/client.ts index 4f0d052c8..6c32c81db 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts @@ -24,7 +24,10 @@ function checkIndexTags (html: string, title: string, description: string, css: expect(html).to.contain('') const htmlConfig: HTMLServerConfig = omit(config, 'signup') - expect(html).to.contain(``) + const configObjectString = JSON.stringify(htmlConfig) + const configEscapedString = JSON.stringify(configObjectString) + + expect(html).to.contain(``) } describe('Test a client controllers', function () { @@ -479,6 +482,16 @@ 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 () {