test: relax content-security-policy test using regex

This commit is contained in:
Pooya Parsa 2018-01-15 13:42:08 +03:30
parent 957bc26583
commit 89d928ae44

View File

@ -252,10 +252,7 @@ test('Content-Security-Policy Header', async t => {
resolveWithFullResponse: true
})
// Verify functionality
t.is(
headers['content-security-policy'],
"script-src 'self' 'sha256-BBvfKxDOoRM/gnFwke9u60HBZX3HUss/0lSI1sBRvOU='"
)
t.regex(headers['content-security-policy'], /script-src 'self' 'sha256-.*'/)
})
test('/_nuxt/server-bundle.json should return 404', async t => {