From dab40b3bf9e0824faf25268b2b58a3c355e12349 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 27 Apr 2024 16:26:12 +0400 Subject: [PATCH] Additional fixes --- src/dom_components/index.ts | 12 ++++++------ src/parser/model/ParserHtml.ts | 1 + test/specs/parser/model/ParserHtml.ts | 8 +++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/dom_components/index.ts b/src/dom_components/index.ts index a3b222283..faf587d5d 100644 --- a/src/dom_components/index.ts +++ b/src/dom_components/index.ts @@ -252,9 +252,9 @@ export default class ComponentManager extends ItemManagerModule { const result = [ { tagName: 'div', - attributes: {}, type: 'text', test: { prop1: 'value1', @@ -553,7 +552,6 @@ describe('ParserHtml', () => { const result = [ { tagName: 'div', - attributes: {}, type: 'text', test: ['value1', 'value2'], components: { type: 'textnode', content: 'test2 ' }, @@ -655,7 +653,7 @@ describe('ParserHtml', () => { expect(obj.parse(str, null, { preParser }).html).toEqual([result]); }); - test.only('parsing as document', () => { + test('parsing as document', () => { const str = ` @@ -672,13 +670,13 @@ describe('ParserHtml', () => { `; - // asDocument: true - console.log(obj.parse(str, null, { asDocument: true })); + expect(obj.parse(str, null, { asDocument: true })).toEqual({ doctype: '', root: { classes: ['cls-html'], attributes: { lang: 'en' }, htmlp: true }, head: { type: 'head', + tagName: 'head', headp: true, classes: ['cls-head'], components: [