7de192d486
* ci: add dependencies about lint tool * ci: replace eslint with prettier * ci: add husky, cz and commitlint * style: lint fix via prettier * ci: add prettier and check-types to github workflow '
25 lines
647 B
TypeScript
25 lines
647 B
TypeScript
import PostgresSQL from '../../../src/parser/pgsql';
|
|
|
|
describe('PostgresSQL SQL Syntax Tests', () => {
|
|
const parser = new PostgresSQL();
|
|
|
|
test('Select Statement', () => {
|
|
const sql = 'select id, t_name from user1;';
|
|
const result = parser.validate(sql);
|
|
|
|
expect(result.length).toBe(0);
|
|
});
|
|
|
|
test('Select 1+1', () => {
|
|
const sql = 'SELECT 1+1;';
|
|
const result = parser.validate(sql);
|
|
expect(result.length).toBe(0);
|
|
});
|
|
|
|
test('Select 1+1', () => {
|
|
const sql = 'SELECT 1+1;';
|
|
const result = parser.validate(sql);
|
|
expect(result.length).toBe(0);
|
|
});
|
|
});
|