15 lines
402 B
JavaScript
15 lines
402 B
JavaScript
import {expect, test} from 'vitest';
|
|
|
|
import evaluate from '@/astride/evaluate.js';
|
|
import expression from '@/astride/test/expression.js';
|
|
|
|
test('evaluates numeric literals', async () => {
|
|
expect(evaluate(await expression('1')))
|
|
.to.deep.include({value: 1});
|
|
});
|
|
|
|
test('evaluates string literals', async () => {
|
|
expect(evaluate(await expression('"1"')))
|
|
.to.deep.include({value: '1'});
|
|
});
|