File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed
tests/hydration/samples/whitespace-at-block-start Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ export function hydrate(component, options) {
142
142
}
143
143
if ( error !== HYDRATION_ERROR ) {
144
144
// eslint-disable-next-line no-console
145
- console . error ( 'Failed to hydrate: ' , error ) ;
145
+ console . warn ( 'Failed to hydrate: ' , error ) ;
146
146
}
147
147
148
148
if ( options . recover === false ) {
Original file line number Diff line number Diff line change 1
1
import { test } from '../../test' ;
2
2
3
- /** @type {string[] } */
4
- let logs = [ ] ;
5
- /** @type {typeof console['error'] } */
6
- let console_error ;
7
-
8
3
export default test ( {
9
- before_test ( ) {
10
- console_error = console . error ;
11
- console . error = ( ...args ) => logs . push ( args . join ( '' ) ) ;
12
- } ,
13
- after_test ( ) {
14
- console . error = console_error ;
15
- } ,
16
- test ( { deepEqual } ) {
17
- deepEqual ( logs , [
18
- "Failed to hydrate: HierarchyRequestError: Node can't be inserted in a #text parent."
19
- ] ) ;
20
- }
4
+ errors : [
5
+ 'Failed to hydrate: ' ,
6
+ new DOMException ( "Node can't be inserted in a #text parent." , 'HierarchyRequestError' )
7
+ ]
21
8
} ) ;
You can’t perform that action at this time.
0 commit comments