Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
() => chai.assert.deepEqual(evaluateXPathToNumbers('round(())', documentNode), []));
it('returns NaN when given NaN',
it('works with boolean values: all', () =>
chai.assert.deepEqual(evaluateXPathToNumbers('(1,2,3)[true()]', documentNode), [1, 2, 3]));
it('works with boolean values: none', () =>
it('creates an empty sequence when passed () to 10', () =>
chai.assert.deepEqual(evaluateXPathToNumbers('() to 10'), []));
it('atomizes attributes to anyUntypedAtomic, then transforming it to a numerical value', () => {
jsonMlMapper.parse(
[
'someElement',
{
attr: '1'
}
],
documentNode
);
chai.assert.deepEqual(evaluateXPathToNumbers('@attr to 2', documentNode.firstChild), [
1,
2
]);
});
it('supports positionalVariableBindings', () => {
chai.assert.deepEqual(
evaluateXPathToNumbers('for $item at $index in (4,5,6) return ($item, $index)'),
[4, 1, 5, 2, 6, 3]
);
});
it('supports variableBindings and positionalVariableBindings with namespaces', () => {
() => chai.assert.empty(evaluateXPathToNumbers('(1,2,3)[()]')));
it('returns the sequence when filtering with a string',
it('returns an empty sequence when given an empty sequence', () =>
chai.assert.deepEqual(
evaluateXPathToNumbers('round-half-to-even(())', documentNode),
[]
));
it('returns NaN when given NaN', () =>
it('creates a sequence', () =>
chai.assert.deepEqual(evaluateXPathToNumbers('1 to 10'), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]));
() => evaluateXPathToNumbers('@attr to 2', documentNode.firstChild),
'FORG0001'
chai.assert.throws(() => evaluateXPathToNumbers('@attr to 2', documentNode.firstChild), 'FORG0001');
});