test: remove barrier files to improve unit testing performance (#249)
* test: remove barrier files to improve unit testing performance * chore: change check-types command
This commit is contained in:
		@ -1,4 +1,5 @@
 | 
			
		||||
import { SparkSQL, SparkSqlSplitListener, SparkSqlParserListener } from '../../filters';
 | 
			
		||||
import SparkSQL, { SparkSqlSplitListener } from 'src/parser/spark';
 | 
			
		||||
import { SparkSqlParserListener } from 'src/lib/spark/SparkSqlParserListener';
 | 
			
		||||
 | 
			
		||||
const validSQL1 = `INSERT INTO country_page_view
 | 
			
		||||
VALUES ('Chinese', 'mumiao', 18),
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { SparkSQL } from '../../filters';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
 | 
			
		||||
describe('SparkSQL Lexer tests', () => {
 | 
			
		||||
    const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,6 @@
 | 
			
		||||
import { SparkSQL, ParseTreeListener, SparkSqlParserListener } from '../../filters';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { SparkSqlParserListener } from 'src/lib/spark/SparkSqlParserListener';
 | 
			
		||||
import { ParseTreeListener } from 'antlr4ts/tree/ParseTreeListener';
 | 
			
		||||
 | 
			
		||||
describe('Spark SQL Listener Tests', () => {
 | 
			
		||||
    const expectTableName = 'user1';
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,7 @@
 | 
			
		||||
import fs from 'fs';
 | 
			
		||||
import path from 'path';
 | 
			
		||||
import { SparkSQL, CaretPosition, SyntaxContextType } from '../../../filters';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { CaretPosition, SyntaxContextType } from 'src/parser/common/basic-parser-types';
 | 
			
		||||
 | 
			
		||||
const syntaxSql = fs.readFileSync(
 | 
			
		||||
    path.join(__dirname, 'fixtures', 'multipleStatement.sql'),
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,8 @@
 | 
			
		||||
import fs from 'fs';
 | 
			
		||||
import path from 'path';
 | 
			
		||||
import { SparkSQL, CaretPosition, SyntaxContextType } from '../../../filters';
 | 
			
		||||
import { commentOtherLine } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { CaretPosition, SyntaxContextType } from 'src/parser/common/basic-parser-types';
 | 
			
		||||
import { commentOtherLine } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const syntaxSql = fs.readFileSync(
 | 
			
		||||
    path.join(__dirname, 'fixtures', 'syntaxSuggestion.sql'),
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,8 @@
 | 
			
		||||
import fs from 'fs';
 | 
			
		||||
import path from 'path';
 | 
			
		||||
import { SparkSQL, CaretPosition } from '../../../filters';
 | 
			
		||||
import { commentOtherLine } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { CaretPosition } from 'src/parser/common/basic-parser-types';
 | 
			
		||||
import { commentOtherLine } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const tokenSql = fs.readFileSync(path.join(__dirname, 'fixtures', 'tokenSuggestion.sql'), 'utf-8');
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { SparkSQL } from '../../../filters';
 | 
			
		||||
import { readSQL } from '../../../helper';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { readSQL } from 'test/helper';
 | 
			
		||||
 | 
			
		||||
const parser = new SparkSQL();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { SparkSQL } from '../../filters';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
 | 
			
		||||
const randomText = `dhsdansdnkla ndjnsla ndnalks`;
 | 
			
		||||
const unCompleteSQL = `CREATE TABLE`;
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,6 @@
 | 
			
		||||
import { SparkSQL, SparkSqlParserVisitor, AbstractParseTreeVisitor } from '../../filters';
 | 
			
		||||
import SparkSQL from 'src/parser/spark';
 | 
			
		||||
import { SparkSqlParserVisitor } from 'src/lib/spark/SparkSqlParserVisitor';
 | 
			
		||||
import { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor';
 | 
			
		||||
 | 
			
		||||
describe('Spark SQL Visitor Tests', () => {
 | 
			
		||||
    const expectTableName = 'user1';
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user