Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit df4d54b

Browse files
committed
Fix tests 🚀
1 parent 427d101 commit df4d54b

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

__tests__/head.test.tsx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ describe("Head", () => {
184184

185185
const helmet = Helmet.peek();
186186

187-
// @ts-ignore
188187
expect(helmet.scriptTags).toEqual([
189188
{
190189
type: "text/javascript",
@@ -195,7 +194,29 @@ describe("Head", () => {
195194
{
196195
type: "text/javascript",
197196
innerHTML:
198-
"\nvar url = new URL(window.location.href);\nif (typeof window !== \"undefined\" && !url.searchParams.has(\"app\")) {\n window.addEventListener('load', () => { \n window.cookieconsent.initialise({\n palette: {\n popup: {\n background: '#303F9F',\n text: '#ffffff'\n },\n button: {\n background: '#0F67FF',\n text: '#ffffff'\n }\n },\n theme: 'classic',\n content: {\n dismiss: 'Ok',\n href: window.location.protocol + '//' + window.location.host + '/cookie-policy/',\n message: 'This website uses cookies to ensure you get the best experience.',\n link: 'Learn more about cookie policy'\n }\n });\n });\n} else {\n console.log(\"no cookieconsent\");\n} \n",
197+
"\n" +
198+
"var url = new URL(window.location.href);\n" +
199+
"window.addEventListener('load', () => { \n" +
200+
" window.cookieconsent.initialise({\n" +
201+
" palette: {\n" +
202+
" popup: {\n" +
203+
" background: '#303F9F',\n" +
204+
" text: '#ffffff'\n" +
205+
" },\n" +
206+
" button: {\n" +
207+
" background: '#0F67FF',\n" +
208+
" text: '#ffffff'\n" +
209+
" }\n" +
210+
" },\n" +
211+
" theme: 'classic',\n" +
212+
" content: {\n" +
213+
" dismiss: 'Ok',\n" +
214+
" href: window.location.protocol + '//' + window.location.host + '/cookie-policy/',\n" +
215+
" message: 'This website uses cookies to ensure you get the best experience.',\n" +
216+
" link: 'Learn more about cookie policy'\n" +
217+
" }\n" +
218+
" });\n" +
219+
"}); \n",
199220
},
200221
{
201222
type: "application/ld+json",

0 commit comments

Comments
 (0)