chore: fix error boundary test (#16368)

pull/16369/head
Rich Harris 2 months ago committed by GitHub
parent be0818552d
commit 96ff125fcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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