Fixed failing tests, tested parser more
This commit is contained in:
14
app/imports/parser/parseTree/call.test.ts
Normal file
14
app/imports/parser/parseTree/call.test.ts
Normal 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)');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user