From 67a27a8d2afd62af92e7be21afac59bd0cb43304 Mon Sep 17 00:00:00 2001 From: pushkine Date: Thu, 21 May 2020 20:54:53 +0200 Subject: [PATCH] ignore css hash --- test/hydration/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/hydration/index.ts b/test/hydration/index.ts index 1d90aa69ed..75ebb77aca 100644 --- a/test/hydration/index.ts +++ b/test/hydration/index.ts @@ -91,7 +91,9 @@ describe('hydration', () => { if (before_head) { try { - assert.htmlEqual(head.innerHTML, fs.readFileSync(`${cwd}/_after_head.html`, 'utf-8')); + assert.htmlEqual( + head.innerHTML.replace(/svelte(-ref)?-[a-z0-9]+/g, (m, $1) => $1 ? m : 'svelte-xyz'), + fs.readFileSync(`${cwd}/_after_head.html`, 'utf-8').replace(/svelte(-ref)?-[a-z0-9]+/g, (m, $1) => $1 ? m : 'svelte-xyz')); } catch (error) { if (shouldUpdateExpected()) { fs.writeFileSync(`${cwd}/_after_head.html`, head.innerHTML);