2024-03-27 10:33:25 +08:00
|
|
|
import { FlinkSQL } from 'src/parser/flink';
|
2024-01-16 11:14:03 +08:00
|
|
|
|
|
|
|
const randomText = `dhsdansdnkla ndjnsla ndnalks`;
|
|
|
|
const unCompleteSQL = `CREATE TABLE`;
|
|
|
|
|
|
|
|
describe('Flink SQL validate invalid sql', () => {
|
2024-03-27 10:33:25 +08:00
|
|
|
const flink = new FlinkSQL();
|
2024-01-16 11:14:03 +08:00
|
|
|
|
|
|
|
test('validate random text', () => {
|
2024-03-27 10:33:25 +08:00
|
|
|
expect(flink.validate(randomText).length).not.toBe(0);
|
2024-01-16 11:14:03 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
test('validate unComplete sql', () => {
|
2024-03-27 10:33:25 +08:00
|
|
|
expect(flink.validate(unCompleteSQL).length).not.toBe(0);
|
2024-01-16 11:14:03 +08:00
|
|
|
});
|
|
|
|
});
|