Fixed failing tests, tested parser more

This commit is contained in:
Thaum Rystra
2024-02-20 21:36:32 +02:00
parent ac15512bc5
commit b41d26b3ad
13 changed files with 211 additions and 45 deletions

View File

@@ -0,0 +1,14 @@
import inputProviderForTests from '/imports/api/engine/action/functions/inputProviderForTests.testFn';
import { parse } from '/imports/parser/parser';
import resolve from '/imports/parser/resolve';
import toString from '/imports/parser/toString';
import { assert } from 'chai';
describe('Call Node', function () {
it('compiles', async function () {
const callNode = parse('min( unknownVariable, 1 + 2, 3d30 )');
const { result, context } = await resolve('compile', callNode, undefined, undefined, inputProviderForTests);
assert.isEmpty(context.errors)
assert.equal(toString(result), 'min(unknownVariable, 3, 3d30)');
});
});