Skip to content

Commit

Permalink
Merge branch 'main' into warn-for-illegal-children
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Aug 20, 2023
2 parents d481562 + 0afad8c commit 8c1e853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
13 changes: 0 additions & 13 deletions test/TODO.md

This file was deleted.

12 changes: 4 additions & 8 deletions test/browser/hydrate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,7 @@ describe('hydrate()', () => {
expect(clickHandlers[4]).to.have.been.calledOnce;
});

// Failing because the following condition in diffElementNodes doesn't evaluate to true
// when hydrating a dom node which is not correct
// dom===d && newVNode.text!==oldVNode.text
// We don't set `d` when hydrating. If we did, then newVNode.text would never equal
// oldVNode.text since oldVNode is always EMPTY_OBJ when hydrating
it.skip('should override incorrect pre-existing DOM with VNodes passed into render', () => {
it('should override incorrect pre-existing DOM with VNodes passed into render', () => {
const initialHtml = [
div('sibling'),
ul([li('1'), li('4'), li('3'), li('2')])
Expand Down Expand Up @@ -339,8 +334,9 @@ describe('hydrate()', () => {
].join('');

expect(scratch.innerHTML).to.equal(finalHtml);
// TODO: Fill in with proper log once this test is passing
expect(getLog()).to.deep.equal([]);
expect(getLog()).to.deep.equal([
'<div>sibling1234.insertBefore(<ul>1234, <div>sibling)'
]);
});

it('should not merge attributes with node created by the DOM', () => {
Expand Down

0 comments on commit 8c1e853

Please sign in to comment.