Fix client tests

pull/4429/head
Chocobozzz 2021-09-09 09:47:59 +02:00
parent 29b84d749e
commit afe501a6cd
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,10 @@ function checkIndexTags (html: string, title: string, description: string, css:
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 () {