bb0fad1dbe
* refactor: rename flinksql to flink * refactor: rename pgsql to postgresql * refactor: rename trinosql to trino * refactor: replace all default exports with named export * refactor: rename basicParser to basicSQL * refactor: rename basic-parser-types to types * refactor: replace arrow func with plain func
23 lines
617 B
TypeScript
23 lines
617 B
TypeScript
import { TrinoSQL } from 'src/parser/trino';
|
|
import { readSQL } from 'test/helper';
|
|
|
|
const features = {
|
|
revoke: readSQL(__dirname, 'revoke.sql'),
|
|
revokeRoles: readSQL(__dirname, 'revoke_roles.sql'),
|
|
};
|
|
|
|
describe('TrinoSQL Revoke Statements Syntax Tests', () => {
|
|
const trino = new TrinoSQL();
|
|
// revoke statements
|
|
features.revoke.forEach((sql) => {
|
|
it(sql, () => {
|
|
expect(trino.validate(sql).length).toBe(0);
|
|
});
|
|
});
|
|
features.revokeRoles.forEach((sql) => {
|
|
it(sql, () => {
|
|
expect(trino.validate(sql).length).toBe(0);
|
|
});
|
|
});
|
|
});
|