2020-10-22 19:57:13 +08:00
|
|
|
import SQLParser from '../../../src/parser/flinksql';
|
|
|
|
// todo 校验 token 解析
|
|
|
|
describe('FlinkSQL Lexer tests', () => {
|
|
|
|
const parser = new SQLParser();
|
|
|
|
|
|
|
|
const sql = 'SELECT * FROM table1';
|
|
|
|
const tokens = parser.getAllTokens(sql);
|
|
|
|
|
|
|
|
test('token counts', () => {
|
2020-11-04 18:03:41 +08:00
|
|
|
expect(tokens.length).toBe(6);
|
2020-10-22 19:57:13 +08:00
|
|
|
});
|
|
|
|
});
|