Merge branch 'main' into fix-docs

pull/16367/head
Rich Harris 2 months ago
commit 908804eeaa

@ -1,13 +1,7 @@
import { test } from '../../test'; import { test } from '../../test';
export default test({ export default test({
test({ assert, target, logs, warnings, variant }) { test({ assert, target, logs }) {
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