chore: squelch hydration warning in test suite

pull/16336/head
Rich Harris 2 months ago
parent 8da222f460
commit 294c216bf5

@ -1,7 +1,13 @@
import { test } from '../../test'; import { test } from '../../test';
export default 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.deepEqual(logs, ['error caught']);
assert.htmlEqual(target.innerHTML, `<div>Error!</div><button>Retry</button>`); assert.htmlEqual(target.innerHTML, `<div>Error!</div><button>Retry</button>`);
} }

Loading…
Cancel
Save