<commit_before>describe('pml.Query', function() {
	describe('Getters', function() {
		var sampleData = pml.Parser.parse(`{[|]}
[foo|A]
[bar|B]
[baz|C]
`);
		var pq = new pml.Query(sampleData);
		
		it('Returns the correct length.', function() {
			expect(pq.getLength()).toEqual(1);
			expect(pq.getChildren().getLength()).toEqual(3);
		});
	});
});<commit_msg>Added more tests.<commit_after>describe('pml.Query', function() {
	var sampleData = pml.Parser.parse(`{[|]}
[foo|A]
[bar|]
[baz|C]
[bar|D]
[quux|
	[|argle]
	[bargle|morple]
	[swoosh|]
]
[extra|
	[|]
	[2|]
]
`);
	var pq = new pml.Query(sampleData);
	
	describe('.prototype.getLength()', function() {
		it('Returns the correct length.', function() {
			expect(pq.getLength()).toEqual(1);
			expect(pq.getChildren().getLength()).toEqual(6);
		});
	});
	describe('.prototype.getNodes()', function() {
		it('Returns the original list of nodes.', function() {
			expect(pq.getNodes()).toEqual([sampleData]);
			expect(pq.getChildren().getNodes()).toEqual(sampleData.children);
		});
	});
	describe('.prototype.getName()', function() {
		it('Returns the name of the first node.', function() {
			expect(pq.getName()).toEqual('');
			expect(pq.getChildren().getName()).toEqual('foo');
		});
	});
	describe('.prototype.getValue()', function() {
		it('Returns the value of the first node.', function() {
			expect(pq.getValue()).toEqual(undefined);
			expect(pq.getChildren().getValue()).toEqual('A');
		});
	});
	describe('.prototype.getNames()', function() {
		it('Returns each name from the list.', function() {
			expect(pq.getNames()).toEqual(['']);
			expect(pq.getChildren().getNames()).toEqual(['foo', 'bar', 'baz', 'bar', 'quux', 'extra']);
		});
	});
	describe('.prototype.getValues()', function() {
		it('Returns each value from the list.', function() {
			expect(pq.getValues()).toEqual([]);
			expect(pq.getChildren().getValues()).toEqual(['A', '', 'C', 'D']);
		});
	});
	describe('.prototype.getLeaves()', function() {
		it('Filters to leaf nodes.', function() {
			expect(pq.getLeaves().getLength()).toEqual(0);
			expect(pq.getChildren().getLeaves().getLength()).toEqual(4);
		});
	});
	describe('.prototype.getBranches()', function() {
		it('Filters to branch nodes.', function() {
			expect(pq.getBranches().getLength()).toEqual(1);
			expect(pq.getChildren().getBranches().getLength()).toEqual(2);
		});
	});
});
{'fraction_non_alphanumeric': 0.24171212757028956, 'fraction_numerical': 0.0037767519932857744, 'mean_word_length': 5.112820512820512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4910135', 'n_tokens_mistral': 879, 'n_tokens_neox': 805, 'n_words': 133}