diff --git a/test/ssgHashes.test.ts b/test/ssgHashes.test.ts index 2f7eff70..913f57a3 100644 --- a/test/ssgHashes.test.ts +++ b/test/ssgHashes.test.ts @@ -198,4 +198,15 @@ describe('[nuxt-security] SSG support of CSP', async () => { const metaFrameAncestors = metaCsp!.split(';').find(policy => policy.trim().startsWith('frame-ancestors')) expect(metaFrameAncestors).toBeUndefined() }) + + it('sets CSP meta at top of head after charset meta', async () => { + const res = await fetch('/') + + const body = await res.text() + + expect(res).toBeDefined() + expect(res).toBeTruthy() + expect(body).toBeDefined() + expect(body).toMatch(/^