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:
@@ -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']);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user