Sfoglia il codice sorgente

HUE-8915 [frontend] Add linting rules for jasmine tests

This adds formatting rules and checks for unwanted focused tests like fit and fdescribe.
Johan Ahlen 6 anni fa
parent
commit
60706f69fe
54 ha cambiato i file con 189 aggiunte e 6 eliminazioni
  1. 18 6
      .eslintrc.js
  2. 1 0
      desktop/core/src/desktop/js/parse/spec/globalSearchParserSpec.js
  3. 3 0
      desktop/core/src/desktop/js/parse/spec/solrFormulaParserSpec.js
  4. 1 0
      desktop/core/src/desktop/js/parse/spec/solrQueryParserSpec.js
  5. 1 0
      desktop/core/src/desktop/js/parse/spec/sqlStatementsParserSpec.js
  6. 12 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParserSpec.js
  7. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Alter_Spec.js
  8. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Create_Spec.js
  9. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Drop_Spec.js
  10. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Error_Spec.js
  11. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Insert_Spec.js
  12. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Select_Spec.js
  13. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Set_Spec.js
  14. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Update_Spec.js
  15. 1 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Use_Spec.js
  16. 20 0
      desktop/core/src/desktop/js/parse/sql/generic/spec/genericSyntaxParserSpec.js
  17. 19 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParserSpec.js
  18. 2 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Alter_Spec.js
  19. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Analyze_Spec.js
  20. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Create_Spec.js
  21. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Describe_Spec.js
  22. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Drop_Spec.js
  23. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Error_Spec.js
  24. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Grant_Spec.js
  25. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Import_Export_Spec.js
  26. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Insert_Spec.js
  27. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Load_Spec.js
  28. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Select_Spec.js
  29. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Set_Spec.js
  30. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Show_Spec.js
  31. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Update_Spec.js
  32. 1 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Use_Spec.js
  33. 22 0
      desktop/core/src/desktop/js/parse/sql/hive/spec/hiveSyntaxParserSpec.js
  34. 11 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParserSpec.js
  35. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Alter_Spec.js
  36. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Analyze_Spec.js
  37. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Create_Spec.js
  38. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Describe_Spec.js
  39. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Drop_Spec.js
  40. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Error_Spec.js
  41. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Grant_Spec.js
  42. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Insert_Spec.js
  43. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Load_Spec.js
  44. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Select_Spec.js
  45. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Set_Spec.js
  46. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Show_Spec.js
  47. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Update_Spec.js
  48. 1 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Use_Spec.js
  49. 20 0
      desktop/core/src/desktop/js/parse/sql/impala/spec/impalaSyntaxParserSpec.js
  50. 7 0
      desktop/core/src/desktop/js/sql/spec/autocompleteResultsSpec.js
  51. 10 0
      desktop/core/src/desktop/js/sql/spec/sqlAutocompleterSpec_IGNORE.js
  52. 1 0
      desktop/core/src/desktop/js/sql/spec/stringDistanceSpec.js
  53. 1 0
      desktop/core/src/desktop/js/utils/spec/hdfsAutocompleterSpec.js
  54. 3 0
      desktop/core/src/desktop/js/utils/spec/hueUtilsSpec.js

+ 18 - 6
.eslintrc.js

@@ -27,7 +27,8 @@ module.exports = {
   env: {
     browser: true,
     node: true,
-    es6: true
+    es6: true,
+    jasmine: true
   },
   extends: [
     'plugin:prettier/recommended'
@@ -40,15 +41,26 @@ module.exports = {
     ecmaFeatures: {
     }
   },
-  plugins: [],
+  plugins: [
+    'jasmine'
+  ],
   rules: {
+    'jasmine/expect-matcher': 1,
+    'jasmine/expect-single-argument': 1,
+    'jasmine/new-line-before-expect': 1,
+    'jasmine/new-line-between-declarations': 1,
+    'jasmine/no-focused-tests': 2,
+    'jasmine/no-global-setup': 2,
+    'jasmine/no-promise-without-done-fail': 1,
+    'jasmine/no-suite-callback-args': 2,
+    'jasmine/no-suite-dupes': 1,
     'new-cap': 0,
     'no-console': 0,
-    "no-restricted-syntax": [
-      "error",
+    'no-restricted-syntax': [
+      'error',
       {
-        "selector": "CallExpression[callee.object.name='console'][callee.property.name!=/^(warn|error|info|trace)$/]",
-        "message": "Unexpected property on console object was called"
+        'selector': 'CallExpression[callee.object.name="console"][callee.property.name!=/^(warn|error|info|trace)$/]',
+        'message': 'Unexpected property on console object was called'
       }
     ],
     'no-extra-boolean-cast': 0,

+ 1 - 0
desktop/core/src/desktop/js/parse/spec/globalSearchParserSpec.js

@@ -19,6 +19,7 @@ import globalSearchParser from '../globalSearchParser';
 describe('globalSearchParser.js', () => {
   const testParser = function(beforeCursor, afterCursor, expectedResult) {
     const result = globalSearchParser.parseGlobalSearch(beforeCursor, afterCursor, true);
+
     expect(result).toEqual(expectedResult);
   };
 

+ 3 - 0
desktop/core/src/desktop/js/parse/spec/solrFormulaParserSpec.js

@@ -23,6 +23,7 @@ describe('solrFormulaParser.js', () => {
       if (!expectedResult.locations) {
         delete result.locations;
       }
+
       expect(result).toEqual(expectedResult);
     };
 
@@ -109,6 +110,7 @@ describe('solrFormulaParser.js', () => {
   describe('parse', () => {
     const testParse = function(expression, expectedResult) {
       const result = solrFormulaParser.parseSolrFormula(expression);
+
       expect(result).toBeTruthy();
       expect(result).toEqual(expectedResult);
     };
@@ -121,6 +123,7 @@ describe('solrFormulaParser.js', () => {
 
     it('should fail parsing "min(boo"', () => {
       const result = solrFormulaParser.parseSolrFormula('min(boo');
+
       expect(result).toBeFalsy();
     });
 

+ 1 - 0
desktop/core/src/desktop/js/parse/spec/solrQueryParserSpec.js

@@ -22,6 +22,7 @@ describe('solrQueryParser.js', () => {
     if (!expectedResult.locations) {
       delete result.locations;
     }
+
     expect(result).toEqual(expectedResult);
   };
 

+ 1 - 0
desktop/core/src/desktop/js/parse/spec/sqlStatementsParserSpec.js

@@ -54,6 +54,7 @@ describe('sqlStatementsParser.js', () => {
         stringifySplitResult(result) +
         '\nExpected output: ' +
         stringifySplitResult(expectedOutput);
+
       expect(result).toEqual(expectedOutput, because);
     } catch (error) {
       console.error(error);

+ 12 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParserSpec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,
@@ -300,6 +301,7 @@ describe('genericAutocompleteParser.js', () => {
         ']',
         ';'
       ];
+
       expect(genericAutocompleteParser.identifyPartials('', '')).toEqual({ left: 0, right: 0 });
       expect(genericAutocompleteParser.identifyPartials('foo', '')).toEqual({ left: 3, right: 0 });
       expect(genericAutocompleteParser.identifyPartials(' foo', '')).toEqual({ left: 3, right: 0 });
@@ -307,24 +309,29 @@ describe('genericAutocompleteParser.js', () => {
         left: 4,
         right: 0
       });
+
       expect(genericAutocompleteParser.identifyPartials('foo', 'bar')).toEqual({
         left: 3,
         right: 3
       });
+
       expect(genericAutocompleteParser.identifyPartials('fo', 'o()')).toEqual({
         left: 2,
         right: 3
       });
+
       expect(genericAutocompleteParser.identifyPartials('fo', 'o(')).toEqual({ left: 2, right: 2 });
       expect(genericAutocompleteParser.identifyPartials('fo', 'o(bla bla)')).toEqual({
         left: 2,
         right: 10
       });
+
       expect(genericAutocompleteParser.identifyPartials('foo ', '')).toEqual({ left: 0, right: 0 });
       expect(genericAutocompleteParser.identifyPartials("foo '", "'")).toEqual({
         left: 0,
         right: 0
       });
+
       expect(genericAutocompleteParser.identifyPartials('foo "', '"')).toEqual({
         left: 0,
         right: 0
@@ -334,26 +341,31 @@ describe('genericAutocompleteParser.js', () => {
           left: 0,
           right: 0
         });
+
         expect(genericAutocompleteParser.identifyPartials('bar foo' + char + 'foofoo', '')).toEqual(
           {
             left: 6,
             right: 0
           }
         );
+
         expect(
           genericAutocompleteParser.identifyPartials('bar foo' + char + 'foofoo ', '')
         ).toEqual({
           left: 0,
           right: 0
         });
+
         expect(genericAutocompleteParser.identifyPartials('', char + 'foo bar')).toEqual({
           left: 0,
           right: 0
         });
+
         expect(genericAutocompleteParser.identifyPartials('', 'foofoo' + char)).toEqual({
           left: 0,
           right: 6
         });
+
         expect(genericAutocompleteParser.identifyPartials('', ' foofoo' + char)).toEqual({
           left: 0,
           right: 0

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Alter_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js ALTER statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Create_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js CREATE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Drop_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js DROP statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Error_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js Error statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Insert_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js INSERT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Select_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js SELECT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Set_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js SET statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Update_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js UPDATE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Use_Spec.js

@@ -27,6 +27,7 @@ describe('genericAutocompleteParser.js USE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       genericAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 20 - 0
desktop/core/src/desktop/js/parse/sql/generic/spec/genericSyntaxParserSpec.js

@@ -23,56 +23,67 @@ describe('genericSyntaxParser.js', () => {
 
   it('should not find errors for ""', () => {
     const result = genericSyntaxParser.parseSyntax('', '');
+
     expect(result).toBeFalsy();
   });
 
   it('should report incomplete statement for "SEL"', () => {
     const result = genericSyntaxParser.parseSyntax('SEL', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT"', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT "', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT ', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should not report incomplete statement for "SELECT * FROM tbl"', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT * FROM tbl', '');
+
     expect(result.incompleteStatement).toBeFalsy();
   });
 
   it('should not report incomplete statement for "SELECT * FROM tbl LIMIT 1"', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT * FROM tbl LIMIT 1', '');
+
     expect(result.incompleteStatement).toBeFalsy();
   });
 
   it('should report incomplete statement for "SELECT * FROM tbl LIMIT "', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT * FROM tbl LIMIT ', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT * FROM tbl GROUP"', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT * FROM tbl GROUP', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should not find errors for "SELECT *"', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT *', '');
+
     expect(result).toBeFalsy();
   });
 
   it('should not report incomplete statement for "SELECT * FR"', () => {
     const result = genericSyntaxParser.parseSyntax('SELECT * FR', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should find errors for "SLELECT "', () => {
     const result = genericSyntaxParser.parseSyntax('SLELECT ', '');
+
     expect(result).toBeTruthy();
     expect(result.text).toEqual('SLELECT');
     expect(result.expected.length).toBeGreaterThan(0);
@@ -82,6 +93,7 @@ describe('genericSyntaxParser.js', () => {
 
   it('should find errors for "alter tabel "', () => {
     const result = genericSyntaxParser.parseSyntax('alter tabel ', '');
+
     expect(result).toBeTruthy();
     expect(result.text).toEqual('tabel');
     expect(result.expected.length).toBeGreaterThan(0);
@@ -91,6 +103,7 @@ describe('genericSyntaxParser.js', () => {
 
   it('should find errors for "select *  form "', () => {
     const result = genericSyntaxParser.parseSyntax('select *  form ', '');
+
     expect(result).toBeTruthy();
     expect(result.loc.first_column).toEqual(10);
     expect(result.loc.last_column).toEqual(14);
@@ -102,16 +115,19 @@ describe('genericSyntaxParser.js', () => {
       'select * from customers c cultster by awasd asd afd;',
       ''
     );
+
     expect(result).toBeTruthy();
   });
 
   it('should find errors for "select asdf wer qwer qewr   qwer"', () => {
     const result = genericSyntaxParser.parseSyntax('select asdf wer qwer qewr   qwer', '');
+
     expect(result).toBeTruthy();
   });
 
   it('should suggest expected words for "SLELECT "', () => {
     const result = genericSyntaxParser.parseSyntax('SLELECT ', '');
+
     expect(result).toBeTruthy();
     expect(expectedToStrings(result.expected)).toEqual([
       'SELECT',
@@ -129,6 +145,7 @@ describe('genericSyntaxParser.js', () => {
 
   it('should suggest expected words for "slelect "', () => {
     const result = genericSyntaxParser.parseSyntax('slelect ', '');
+
     expect(result).toBeTruthy();
     expect(expectedToStrings(result.expected)).toEqual([
       'select',
@@ -146,6 +163,7 @@ describe('genericSyntaxParser.js', () => {
 
   it('should suggest expected that the statement should end for "use somedb extrastuff "', () => {
     const result = genericSyntaxParser.parseSyntax('use somedb extrastuff  ', '');
+
     expect(result).toBeTruthy();
     expect(result.expectedStatementEnd).toBeTruthy();
   });
@@ -153,6 +171,7 @@ describe('genericSyntaxParser.js', () => {
   const expectEqualIds = function(beforeA, afterA, beforeB, afterB) {
     const resultA = genericSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = genericSyntaxParser.parseSyntax(beforeB, afterB);
+
     expect(resultA).toBeTruthy('"' + beforeA + '|' + afterA + '" was not reported as an error');
     expect(resultB).toBeTruthy('"' + beforeB + '|' + afterB + '" was not reported as an error');
     expect(resultA.ruleId).toEqual(resultB.ruleId);
@@ -161,6 +180,7 @@ describe('genericSyntaxParser.js', () => {
   const expectNonEqualIds = function(beforeA, afterA, beforeB, afterB) {
     const resultA = genericSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = genericSyntaxParser.parseSyntax(beforeB, afterB);
+
     expect(resultA).toBeTruthy('"' + beforeA + '|' + afterA + '" was not reported as an error');
     expect(resultB).toBeTruthy('"' + beforeB + '|' + afterB + '" was not reported as an error');
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);

+ 19 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParserSpec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,
@@ -454,6 +455,7 @@ describe('hiveAutocompleteParser.js', () => {
         ']',
         ';'
       ];
+
       expect(hiveAutocompleteParser.identifyPartials('', '')).toEqual({ left: 0, right: 0 });
       expect(hiveAutocompleteParser.identifyPartials('foo', '')).toEqual({ left: 3, right: 0 });
       expect(hiveAutocompleteParser.identifyPartials(' foo', '')).toEqual({ left: 3, right: 0 });
@@ -461,6 +463,7 @@ describe('hiveAutocompleteParser.js', () => {
         left: 4,
         right: 0
       });
+
       expect(hiveAutocompleteParser.identifyPartials('foo', 'bar')).toEqual({ left: 3, right: 3 });
       expect(hiveAutocompleteParser.identifyPartials('fo', 'o()')).toEqual({ left: 2, right: 3 });
       expect(hiveAutocompleteParser.identifyPartials('fo', 'o(')).toEqual({ left: 2, right: 2 });
@@ -468,6 +471,7 @@ describe('hiveAutocompleteParser.js', () => {
         left: 2,
         right: 10
       });
+
       expect(hiveAutocompleteParser.identifyPartials('foo ', '')).toEqual({ left: 0, right: 0 });
       expect(hiveAutocompleteParser.identifyPartials("foo '", "'")).toEqual({ left: 0, right: 0 });
       expect(hiveAutocompleteParser.identifyPartials('foo "', '"')).toEqual({ left: 0, right: 0 });
@@ -476,22 +480,27 @@ describe('hiveAutocompleteParser.js', () => {
           left: 0,
           right: 0
         });
+
         expect(hiveAutocompleteParser.identifyPartials('bar foo' + char + 'foofoo', '')).toEqual({
           left: 6,
           right: 0
         });
+
         expect(hiveAutocompleteParser.identifyPartials('bar foo' + char + 'foofoo ', '')).toEqual({
           left: 0,
           right: 0
         });
+
         expect(hiveAutocompleteParser.identifyPartials('', char + 'foo bar')).toEqual({
           left: 0,
           right: 0
         });
+
         expect(hiveAutocompleteParser.identifyPartials('', 'foofoo' + char)).toEqual({
           left: 0,
           right: 6
         });
+
         expect(hiveAutocompleteParser.identifyPartials('', ' foofoo' + char)).toEqual({
           left: 0,
           right: 0
@@ -515,6 +524,7 @@ describe('hiveAutocompleteParser.js', () => {
 
       const identifierChain = [{ name: 'testItem' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'testArray' }, { name: 'item' }]);
     });
 
@@ -533,12 +543,14 @@ describe('hiveAutocompleteParser.js', () => {
       const identifierChain = [{ name: 'explodedMap' }, { name: 'testMapValue' }];
 
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'testMap' }, { name: 'value' }]);
     });
 
     it('should expand 03', () => {
       const identifierChain = [{ name: 'testMap', keySet: true }];
       const result = hiveAutocompleteParser.expandLateralViews([], identifierChain);
+
       expect(result).toEqual([{ name: 'testMap', keySet: true }]);
     });
 
@@ -556,6 +568,7 @@ describe('hiveAutocompleteParser.js', () => {
 
       const identifierChain = [{ name: 'testItem' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'testArray' }, { name: 'item' }]);
     });
 
@@ -581,6 +594,7 @@ describe('hiveAutocompleteParser.js', () => {
 
       const identifierChain = [{ name: 'testItemA' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'testArrayA' }, { name: 'item' }]);
     });
 
@@ -605,6 +619,7 @@ describe('hiveAutocompleteParser.js', () => {
       ];
       const identifierChain = [{ name: 'testItemB' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'tt2' }, { name: 'testArrayB' }, { name: 'item' }]);
     });
 
@@ -630,6 +645,7 @@ describe('hiveAutocompleteParser.js', () => {
 
       const identifierChain = [{ name: 'ta2_exp' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([
         { name: 'tt' },
         { name: 'testArray1' },
@@ -653,6 +669,7 @@ describe('hiveAutocompleteParser.js', () => {
 
       const identifierChain = [{ name: 'testValue' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'testArray' }, { name: 'item' }]);
     });
 
@@ -670,6 +687,7 @@ describe('hiveAutocompleteParser.js', () => {
 
       const identifierChain = [{ name: 'testMapValue' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'testMap' }, { name: 'value' }]);
     });
 
@@ -687,6 +705,7 @@ describe('hiveAutocompleteParser.js', () => {
 
       const identifierChain = [{ name: 'testItem' }];
       const result = hiveAutocompleteParser.expandLateralViews(lateralViews, identifierChain);
+
       expect(result).toEqual([{ name: 'testArray' }, { name: 'item' }]);
     });
   });

+ 2 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Alter_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js ALTER statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,
@@ -255,6 +256,7 @@ describe('hiveAutocompleteParser.js ALTER statements', () => {
         }
       });
     });
+
     it('should handle "ALTER TABLE foo PARTITION (ds=\'2008-04-08\', hr) CHANGE COLUMN dec_column_name dec_column_name DECIMAL;|"', () => {
       assertAutoComplete({
         beforeCursor:

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Analyze_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js ANALYZE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Create_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js CREATE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Describe_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js DESCRIBE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Drop_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js DROP statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Error_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js Error statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Grant_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js GRANT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Import_Export_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js IMPORT and EXPORT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Insert_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js INSERT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Load_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js LOAD statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Select_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js SELECT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Set_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js SET statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Show_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js SHOW statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Update_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js UPDATE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Use_Spec.js

@@ -27,6 +27,7 @@ describe('hiveAutocompleteParser.js USE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       hiveAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 22 - 0
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveSyntaxParserSpec.js

@@ -23,56 +23,67 @@ describe('hiveSyntaxParser.js', () => {
 
   it('should not find errors for ""', () => {
     const result = hiveSyntaxParser.parseSyntax('', '');
+
     expect(result).toBeFalsy();
   });
 
   it('should report incomplete statement for "SEL"', () => {
     const result = hiveSyntaxParser.parseSyntax('SEL', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT"', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT "', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT ', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should not report incomplete statement for "SELECT * FROM tbl"', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT * FROM tbl', '');
+
     expect(result.incompleteStatement).toBeFalsy();
   });
 
   it('should not report incomplete statement for "SELECT * FROM tbl LIMIT 1"', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT * FROM tbl LIMIT 1', '');
+
     expect(result.incompleteStatement).toBeFalsy();
   });
 
   it('should report incomplete statement for "SELECT * FROM tbl LIMIT "', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT * FROM tbl LIMIT ', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT * FROM tbl GROUP"', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT * FROM tbl GROUP', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should not find errors for "SELECT *"', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT *', '');
+
     expect(result).toBeFalsy();
   });
 
   it('should not report incomplete statement for "SELECT * FR"', () => {
     const result = hiveSyntaxParser.parseSyntax('SELECT * FR', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should find errors for "SLELECT "', () => {
     const result = hiveSyntaxParser.parseSyntax('SLELECT ', '');
+
     expect(result).toBeTruthy();
     expect(result.text).toEqual('SLELECT');
     expect(result.expected.length).toBeGreaterThan(0);
@@ -82,6 +93,7 @@ describe('hiveSyntaxParser.js', () => {
 
   it('should find errors for "alter tabel "', () => {
     const result = hiveSyntaxParser.parseSyntax('alter tabel ', '');
+
     expect(result).toBeTruthy();
     expect(result.text).toEqual('tabel');
     expect(result.expected.length).toBeGreaterThan(0);
@@ -91,6 +103,7 @@ describe('hiveSyntaxParser.js', () => {
 
   it('should find errors for "select *  form "', () => {
     const result = hiveSyntaxParser.parseSyntax('select *  form ', '');
+
     expect(result).toBeTruthy();
     expect(result.loc.first_column).toEqual(10);
     expect(result.loc.last_column).toEqual(14);
@@ -115,16 +128,19 @@ describe('hiveSyntaxParser.js', () => {
       'select * from customers c cultster by awasd asd afd;',
       ''
     );
+
     expect(result).toBeTruthy();
   });
 
   it('should find errors for "select asdf wer qwer qewr   qwer"', () => {
     const result = hiveSyntaxParser.parseSyntax('select asdf wer qwer qewr   qwer', '');
+
     expect(result).toBeTruthy();
   });
 
   it('should suggest expected words for "SLELECT "', () => {
     const result = hiveSyntaxParser.parseSyntax('SLELECT ', '');
+
     expect(result).toBeTruthy();
     expect(expectedToStrings(result.expected)).toEqual([
       'SELECT',
@@ -157,6 +173,7 @@ describe('hiveSyntaxParser.js', () => {
 
   it('should suggest expected words for "slelect "', () => {
     const result = hiveSyntaxParser.parseSyntax('slelect ', '');
+
     expect(result).toBeTruthy();
     expect(expectedToStrings(result.expected)).toEqual([
       'select',
@@ -189,6 +206,7 @@ describe('hiveSyntaxParser.js', () => {
 
   it('should suggest expected that the statement should end for "use somedb extrastuff "', () => {
     const result = hiveSyntaxParser.parseSyntax('use somedb extrastuff  ', '');
+
     expect(result).toBeTruthy();
     expect(result.expectedStatementEnd).toBeTruthy();
   });
@@ -199,12 +217,14 @@ describe('hiveSyntaxParser.js', () => {
       '',
       false
     );
+
     expect(result).toBeTruthy();
   });
 
   const expectEqualIds = function(beforeA, afterA, beforeB, afterB) {
     const resultA = hiveSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = hiveSyntaxParser.parseSyntax(beforeB, afterB);
+
     expect(resultA).toBeTruthy('"' + beforeA + '|' + afterA + '" was not reported as an error');
     expect(resultB).toBeTruthy('"' + beforeB + '|' + afterB + '" was not reported as an error');
     expect(resultA.ruleId).toEqual(resultB.ruleId);
@@ -213,6 +233,7 @@ describe('hiveSyntaxParser.js', () => {
   const expectNonEqualIds = function(beforeA, afterA, beforeB, afterB) {
     const resultA = hiveSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = hiveSyntaxParser.parseSyntax(beforeB, afterB);
+
     expect(resultA).toBeTruthy('"' + beforeA + '|' + afterA + '" was not reported as an error');
     expect(resultB).toBeTruthy('"' + beforeB + '|' + afterB + '" was not reported as an error');
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);
@@ -240,6 +261,7 @@ describe('hiveSyntaxParser.js', () => {
 
   it('should suggest expected words for "SLELECT "', () => {
     const result = hiveSyntaxParser.parseSyntax('SLELECT ', '');
+
     expect(result).toBeTruthy();
     expect(expectedToStrings(result.expected)).toEqual([
       'SELECT',

+ 11 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParserSpec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,
@@ -431,6 +432,7 @@ describe('impalaAutocompleteParser.js', () => {
         ']',
         ';'
       ];
+
       expect(impalaAutocompleteParser.identifyPartials('', '')).toEqual({ left: 0, right: 0 });
       expect(impalaAutocompleteParser.identifyPartials('foo', '')).toEqual({ left: 3, right: 0 });
       expect(impalaAutocompleteParser.identifyPartials(' foo', '')).toEqual({ left: 3, right: 0 });
@@ -438,21 +440,25 @@ describe('impalaAutocompleteParser.js', () => {
         left: 4,
         right: 0
       });
+
       expect(impalaAutocompleteParser.identifyPartials('foo', 'bar')).toEqual({
         left: 3,
         right: 3
       });
+
       expect(impalaAutocompleteParser.identifyPartials('fo', 'o()')).toEqual({ left: 2, right: 3 });
       expect(impalaAutocompleteParser.identifyPartials('fo', 'o(')).toEqual({ left: 2, right: 2 });
       expect(impalaAutocompleteParser.identifyPartials('fo', 'o(bla bla)')).toEqual({
         left: 2,
         right: 10
       });
+
       expect(impalaAutocompleteParser.identifyPartials('foo ', '')).toEqual({ left: 0, right: 0 });
       expect(impalaAutocompleteParser.identifyPartials("foo '", "'")).toEqual({
         left: 0,
         right: 0
       });
+
       expect(impalaAutocompleteParser.identifyPartials('foo "', '"')).toEqual({
         left: 0,
         right: 0
@@ -462,24 +468,29 @@ describe('impalaAutocompleteParser.js', () => {
           left: 0,
           right: 0
         });
+
         expect(impalaAutocompleteParser.identifyPartials('bar foo' + char + 'foofoo', '')).toEqual({
           left: 6,
           right: 0
         });
+
         expect(impalaAutocompleteParser.identifyPartials('bar foo' + char + 'foofoo ', '')).toEqual(
           {
             left: 0,
             right: 0
           }
         );
+
         expect(impalaAutocompleteParser.identifyPartials('', char + 'foo bar')).toEqual({
           left: 0,
           right: 0
         });
+
         expect(impalaAutocompleteParser.identifyPartials('', 'foofoo' + char)).toEqual({
           left: 0,
           right: 6
         });
+
         expect(impalaAutocompleteParser.identifyPartials('', ' foofoo' + char)).toEqual({
           left: 0,
           right: 0

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Alter_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js ALTER statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Analyze_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js ANALYZE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Create_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js CREATE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Describe_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js DESCRIBE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Drop_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js DROP statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Error_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js Error statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Grant_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js GRANT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Insert_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js INSERT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Load_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js LOAD statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Select_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js SELECT statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Set_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js SET statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Show_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js SHOW statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Update_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js UPDATE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 1 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Use_Spec.js

@@ -27,6 +27,7 @@ describe('impalaAutocompleteParser.js USE statements', () => {
 
   const assertAutoComplete = testDefinition => {
     const debug = false;
+
     expect(
       impalaAutocompleteParser.parseSql(
         testDefinition.beforeCursor,

+ 20 - 0
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaSyntaxParserSpec.js

@@ -23,56 +23,67 @@ describe('impalaSyntaxParser.js', () => {
 
   it('should not find errors for ""', () => {
     const result = impalaSyntaxParser.parseSyntax('', '');
+
     expect(result).toBeFalsy();
   });
 
   it('should report incomplete statement for "SEL"', () => {
     const result = impalaSyntaxParser.parseSyntax('SEL', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT"', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT "', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT ', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should not report incomplete statement for "SELECT * FROM tbl"', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT * FROM tbl', '');
+
     expect(result.incompleteStatement).toBeFalsy();
   });
 
   it('should not report incomplete statement for "SELECT * FROM tbl LIMIT 1"', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT * FROM tbl LIMIT 1', '');
+
     expect(result.incompleteStatement).toBeFalsy();
   });
 
   it('should report incomplete statement for "SELECT * FROM tbl LIMIT "', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT * FROM tbl LIMIT ', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should report incomplete statement for "SELECT * FROM tbl GROUP"', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT * FROM tbl GROUP', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should not find errors for "SELECT *"', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT *', '');
+
     expect(result).toBeFalsy();
   });
 
   it('should not report incomplete statement for "SELECT * FR"', () => {
     const result = impalaSyntaxParser.parseSyntax('SELECT * FR', '');
+
     expect(result.incompleteStatement).toBeTruthy();
   });
 
   it('should find errors for "SLELECT "', () => {
     const result = impalaSyntaxParser.parseSyntax('SLELECT ', '');
+
     expect(result).toBeTruthy();
     expect(result.text).toEqual('SLELECT');
     expect(result.expected.length).toBeGreaterThan(0);
@@ -82,6 +93,7 @@ describe('impalaSyntaxParser.js', () => {
 
   it('should find errors for "alter tabel "', () => {
     const result = impalaSyntaxParser.parseSyntax('alter tabel ', '');
+
     expect(result).toBeTruthy();
     expect(result.text).toEqual('tabel');
     expect(result.expected.length).toBeGreaterThan(0);
@@ -91,6 +103,7 @@ describe('impalaSyntaxParser.js', () => {
 
   it('should find errors for "select *  form "', () => {
     const result = impalaSyntaxParser.parseSyntax('select *  form ', '');
+
     expect(result).toBeTruthy();
     expect(result.loc.first_column).toEqual(10);
     expect(result.loc.last_column).toEqual(14);
@@ -102,16 +115,19 @@ describe('impalaSyntaxParser.js', () => {
       'select * from customers c cultster by awasd asd afd;',
       ''
     );
+
     expect(result).toBeTruthy();
   });
 
   it('should find errors for "select asdf wer qwer qewr   qwer"', () => {
     const result = impalaSyntaxParser.parseSyntax('select asdf wer qwer qewr   qwer', '');
+
     expect(result).toBeTruthy();
   });
 
   it('should suggest expected words for "SLELECT "', () => {
     const result = impalaSyntaxParser.parseSyntax('SLELECT ', '');
+
     expect(result).toBeTruthy();
     expect(expectedToStrings(result.expected)).toEqual([
       'SELECT',
@@ -141,6 +157,7 @@ describe('impalaSyntaxParser.js', () => {
 
   it('should suggest expected words for "slelect "', () => {
     const result = impalaSyntaxParser.parseSyntax('slelect ', '');
+
     expect(result).toBeTruthy();
     expect(expectedToStrings(result.expected)).toEqual([
       'select',
@@ -170,6 +187,7 @@ describe('impalaSyntaxParser.js', () => {
 
   it('should suggest expected that the statement should end for "use somedb extrastuff "', () => {
     const result = impalaSyntaxParser.parseSyntax('use somedb extrastuff  ', '');
+
     expect(result).toBeTruthy();
     expect(result.expectedStatementEnd).toBeTruthy();
   });
@@ -177,6 +195,7 @@ describe('impalaSyntaxParser.js', () => {
   const expectEqualIds = function(beforeA, afterA, beforeB, afterB) {
     const resultA = impalaSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = impalaSyntaxParser.parseSyntax(beforeB, afterB);
+
     expect(resultA).toBeTruthy('"' + beforeA + '|' + afterA + '" was not reported as an error');
     expect(resultB).toBeTruthy('"' + beforeB + '|' + afterB + '" was not reported as an error');
     expect(resultA.ruleId).toEqual(resultB.ruleId);
@@ -185,6 +204,7 @@ describe('impalaSyntaxParser.js', () => {
   const expectNonEqualIds = function(beforeA, afterA, beforeB, afterB) {
     const resultA = impalaSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = impalaSyntaxParser.parseSyntax(beforeB, afterB);
+
     expect(resultA).toBeTruthy('"' + beforeA + '|' + afterA + '" was not reported as an error');
     expect(resultB).toBeTruthy('"' + beforeB + '|' + afterB + '" was not reported as an error');
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);

+ 7 - 0
desktop/core/src/desktop/js/sql/spec/autocompleteResultsSpec.js

@@ -332,6 +332,7 @@ describe('AutocompleteResults.js', () => {
           }
           fail('Still loading, missing ajax spec?');
         }
+
         expect(subject.loading()).toBeFalsy();
       });
       // }
@@ -340,11 +341,13 @@ describe('AutocompleteResults.js', () => {
 
   it('should handle parse results with keywords', () => {
     subject.entries([]);
+
     expect(subject.filtered().length).toBe(0);
     subject.update({
       lowerCase: true,
       suggestKeywords: [{ value: 'BAR', weight: 1 }, { value: 'FOO', weight: 2 }]
     });
+
     expect(subject.filtered().length).toBe(2);
     // Sorted by weight, case adjusted
     expect(subject.filtered()[0].meta).toBe(I18n('keyword'));
@@ -355,11 +358,13 @@ describe('AutocompleteResults.js', () => {
 
   it('should handle parse results with identifiers', () => {
     subject.entries([]);
+
     expect(subject.filtered().length).toBe(0);
     subject.update({
       lowerCase: false,
       suggestIdentifiers: [{ name: 'foo', type: 'alias' }, { name: 'bar', type: 'table' }]
     });
+
     expect(subject.filtered().length).toBe(2);
     // Sorted by name, no case adjust
     expect(subject.filtered()[0].meta).toBe('table');
@@ -370,11 +375,13 @@ describe('AutocompleteResults.js', () => {
 
   it('should handle parse results with functions', () => {
     subject.entries([]);
+
     expect(subject.filtered().length).toBe(0);
     subject.update({
       lowerCase: false,
       suggestFunctions: {}
     });
+
     expect(subject.filtered().length).toBeGreaterThan(0);
     expect(subject.filtered()[0].details.arguments).toBeDefined();
     expect(subject.filtered()[0].details.signature).toBeDefined();

+ 10 - 0
desktop/core/src/desktop/js/sql/spec/sqlAutocompleterSpec_IGNORE.js

@@ -107,15 +107,19 @@ describe('sqlAutocomplete.js', () => {
 
   it('should create suggestions for Hive', () => {
     subject = createSubject('hive', '', '');
+
     expect(subject.suggestions.filtered().length).toBe(0);
     subject.autocomplete();
+
     expect(subject.suggestions.filtered().length).toBeGreaterThan(0);
   });
 
   it('should create suggestions for Impala', () => {
     subject = createSubject('impala', '', '');
+
     expect(subject.suggestions.filtered().length).toBe(0);
     subject.autocomplete();
+
     expect(subject.suggestions.filtered().length).toBeGreaterThan(0);
   });
 
@@ -123,15 +127,19 @@ describe('sqlAutocomplete.js', () => {
     subject = createSubject('hive', 'SELECT FROMzzz bla LIMIT 1; SELECT ', ' FROM bla', {
       location: { first_line: 1, last_line: 1, first_column: 27, last_column: 52 }
     });
+
     expect(subject.suggestions.filtered().length).toBe(0);
     subject.autocomplete();
+
     expect(subject.suggestions.filtered().length).toBeGreaterThan(0);
   });
 
   it("should only fallback to the active query when there are surrounding errors if there's an active query", () => {
     subject = createSubject('hive', 'SELECT FROMzzz bla LIMIT 1; SELECT ', ' FROM bla');
+
     expect(subject.suggestions.filtered().length).toBe(0);
     subject.autocomplete();
+
     expect(subject.suggestions.filtered().length).toBe(0);
   });
 
@@ -141,8 +149,10 @@ describe('sqlAutocomplete.js', () => {
       'SELECT ',
       ' FROM customers, (SELECT app FROM web_logs) AS subQ;'
     );
+
     expect(subject.suggestions.filtered().length).toBe(0);
     subject.autocomplete();
+
     expect(subject.suggestions.filtered().length).toBeGreaterThan(0);
 
     const appFound = subject.suggestions.filtered().some(suggestion => {

+ 1 - 0
desktop/core/src/desktop/js/sql/spec/stringDistanceSpec.js

@@ -20,6 +20,7 @@ describe('stringDistance.js', () => {
   const expectDistance = function(strA, strB, distance, ignoreCase) {
     const lr = stringDistance(strA, strB, ignoreCase);
     const rl = stringDistance(strB, strA, ignoreCase);
+
     expect(lr).toEqual(rl);
     expect(lr).toEqual(distance);
   };

+ 1 - 0
desktop/core/src/desktop/js/utils/spec/hdfsAutocompleterSpec.js

@@ -92,6 +92,7 @@ describe('hdfsAutocompleter.js', () => {
     ajaxHelper.responseForUrls = testDefinition.serverResponses;
     const callback = createCallbackSpyForValues(testDefinition.expectedSuggestions);
     subject.autocomplete(testDefinition.beforeCursor, testDefinition.afterCursor, callback);
+
     expect(callback).toHaveBeenCalled();
   };
 

+ 3 - 0
desktop/core/src/desktop/js/utils/spec/hueUtilsSpec.js

@@ -49,6 +49,7 @@ describe('hue.utils.js', () => {
 
   it('should change completely the URL', () => {
     hueUtils.changeURL('/banana');
+
     expect(window.location.pathname).toEqual('/banana');
     hueUtils.changeURL('/jasmine');
   });
@@ -56,6 +57,7 @@ describe('hue.utils.js', () => {
   it('should change just a parameter in the URL', () => {
     hueUtils.changeURL('/banana?peeled=no');
     hueUtils.changeURLParameter('peeled', 'yes');
+
     expect(window.location.search).toEqual('?peeled=yes');
     hueUtils.changeURL('/jasmine');
   });
@@ -63,6 +65,7 @@ describe('hue.utils.js', () => {
   it('should remove a parameter in the URL', () => {
     hueUtils.changeURL('/banana?peeled=no');
     hueUtils.removeURLParameter('peeled');
+
     expect(window.location.search).toEqual('');
     hueUtils.changeURL('/jasmine');
   });