filterparser tests added to test run

This commit is contained in:
Jan Prochazka
2021-05-30 11:00:32 +02:00
parent 433d3be8d5
commit 78a59ae8dc
3 changed files with 20 additions and 4 deletions

View File

@@ -3,5 +3,9 @@ import { parseFilter } from './parseFilter';
test('parse string', () => {
const ast = parseFilter('"123"', 'string');
console.log(JSON.stringify(ast));
expect(ast).toBe(3);
expect(ast).toEqual({
conditionType: 'like',
left: { exprType: 'placeholder' },
right: { exprType: 'value', value: '%123%' },
});
});