lava-oushudb-dt-sql-parser/test/parser/plsql/syntax.test.ts
Hayden ecbbee32c7
test: remove barrier files to improve unit testing performance (#249)
* test: remove barrier files to improve unit testing performance

* chore: change check-types command
2024-01-19 21:10:00 +08:00

24 lines
646 B
TypeScript

import PLSQL from 'src/parser/plsql';
describe('PLSQL Syntax Tests', () => {
const parser = new PLSQL();
test('Test simple select Statement', () => {
const sql = 'select id,name from user1;';
const result = parser.validate(sql);
expect(result.length).toBe(0);
});
test(`Test select, where, order by`, () => {
const sql = `
select eid, emp_last, mgr_id, reportlevel
from reports_to_101 r, auto a
where r.c1 = a.c2
order by reportlevel, eid
`;
const result = parser.validate(sql);
expect(result.length).toBe(0);
});
});