From be0818552de9d282f5033bf8d1be3de34ce01794 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 14 Jul 2025 16:20:14 -0400 Subject: [PATCH] chore: squelch hydration warning in test suite (#16336) --- .../runtime-runes/samples/error-boundary-9/_config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/svelte/tests/runtime-runes/samples/error-boundary-9/_config.js b/packages/svelte/tests/runtime-runes/samples/error-boundary-9/_config.js index 9664c233b7..9bb12e768d 100644 --- a/packages/svelte/tests/runtime-runes/samples/error-boundary-9/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/error-boundary-9/_config.js @@ -1,7 +1,13 @@ import { test } from '../../test'; export default test({ - test({ assert, target, logs }) { + test({ assert, target, logs, warnings, variant }) { + if (variant === 'hydrate') { + assert.deepEqual(warnings, [ + 'Hydration failed because the initial UI does not match what was rendered on the server' + ]); + } + assert.deepEqual(logs, ['error caught']); assert.htmlEqual(target.innerHTML, `
Error!
`); }