2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-14 18:42:24 +03:00

fix(296): parse with lost repeated closing tag (#297)

* fix: extract node list ot separate file, fix nested parsing

* chore:  node list tests

* fix: nested tags parsing

* chore: changeset

* chore: remove unused files

* chore: disable publish on every commit
This commit is contained in:
Nikolay Kost
2025-10-14 04:11:19 +02:00
committed by GitHub
parent 40041a0680
commit 29f909a589
7 changed files with 183 additions and 77 deletions
@@ -0,0 +1,35 @@
import { NodeList } from '../src/NodeList';
describe('NodeList', () => {
test('push', () => {
const list = new NodeList();
list.push('a');
list.push('b');
list.push('c');
expect(list.ref()).toEqual(['a', 'b', 'c']);
});
test('last', () => {
const list = new NodeList();
list.push('a');
list.push('b');
list.push('c');
expect(list.last()).toBe('c');
expect(list.ref()).toEqual(['a', 'b', 'c']);
});
test('flush', () => {
const list = new NodeList();
list.push('a');
list.push('b');
list.push('c');
expect(list.flush()).toBe('c');
expect(list.ref()).toEqual(['a', 'b']);
});
});