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 resolveWithFullResponse: true
}) })
// Verify functionality // Verify functionality
t.is( t.regex(headers['content-security-policy'], /script-src 'self' 'sha256-.*'/)
headers['content-security-policy'],
"script-src 'self' 'sha256-BBvfKxDOoRM/gnFwke9u60HBZX3HUss/0lSI1sBRvOU='"
)
}) })
test('/_nuxt/server-bundle.json should return 404', async t => { test('/_nuxt/server-bundle.json should return 404', async t => {