!147 fix(no-vdom): modify env test

* fix(no-vdom): modify env test
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* fix(no-vdom): optimize dom.ts file
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* fix(no-vdom): modify $$style
* fix(no-vdom): modify test name
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* fix(no-vdom): modify event
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* fix(no-vdom): modify test code's name rule
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* fix(no-vdom): delete no-vnode module
* fix(no-vdom): update render function
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* Merge branch 'reactive' of https://gitee.com/openInula/inula into reactive
* Merge remote-tracking branch 'origin/reactive' into reactive
* fix(no-vdom): add TS
* fix(no-vdom): change js 2 ts
This commit is contained in:
陈超涛 2024-02-18 08:39:03 +00:00
parent 727db59da0
commit 65a4d6273c
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ function cleanChildren(parent: Node, prevNodes: Node[], marker?: Node, replaceme
const el = prevNodes[i];
if (node !== el) {
const isParent = el.parentNode === parent;
if (!inserted && !i) {
if (!inserted && i === 0) {
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
} else {
isParent && (el as ChildNode).remove();

View File

@ -212,7 +212,7 @@ describe('env', () => {
}
render(() => $$runComponent(App, {}), container);
expect(container.innerHTML).toBe('<div>Theme: dark, Name: inula, Id: 1</div>');
expect(container.innerHTML).toBe('<div>Theme: dark<!---->, Name: inula<!---->, Id: 1</div>');
});
it('should not be affected by parrallel env.', ({container}) => {