瀏覽代碼

HUE-9090 [frontend] Switch to jest for js testing

run with "npm run test" or "npm run test-dev"
Johan Ahlen 6 年之前
父節點
當前提交
7bde5d3d3c
共有 100 個文件被更改,包括 503 次插入677 次删除
  1. 12 1
      .babelrc
  2. 2 2
      .eslintrc.js
  3. 1 1
      desktop/core/src/desktop/js/api/apiHelper.test.js
  4. 1 1
      desktop/core/src/desktop/js/apps/notebook/aceAutocompleteWrapper.test.js
  5. 2 2
      desktop/core/src/desktop/js/apps/notebook2/components/ko.executableActions.test.js
  6. 2 2
      desktop/core/src/desktop/js/apps/notebook2/components/ko.executableProgressBar.test.js
  7. 3 3
      desktop/core/src/desktop/js/apps/notebook2/execution/executor.test.js
  8. 10 4
      desktop/core/src/desktop/js/apps/notebook2/execution/sessionManager.test.js
  9. 7 7
      desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.test.js
  10. 2 2
      desktop/core/src/desktop/js/apps/notebook2/notebook.test.js
  11. 2 2
      desktop/core/src/desktop/js/apps/notebook2/snippet.test.js
  12. 5 0
      desktop/core/src/desktop/js/jest/jest.init.js
  13. 2 0
      desktop/core/src/desktop/js/jest/jquery.setup.js
  14. 0 24
      desktop/core/src/desktop/js/jest/koTestUtils.js
  15. 280 0
      desktop/core/src/desktop/js/jest/sqlTestUtils.js
  16. 2 2
      desktop/core/src/desktop/js/ko/bindings/ko.toogle.test.js
  17. 72 0
      desktop/core/src/desktop/js/ko/components/assist/assistStorageEntry.test.js
  18. 1 3
      desktop/core/src/desktop/js/ko/components/assist/ko.assistFunctionsPanel.test.js
  19. 1 1
      desktop/core/src/desktop/js/ko/components/assist/ko.assistLangRefPanel.test.js
  20. 0 77
      desktop/core/src/desktop/js/ko/components/assist/spec/assistStorageEntrySpec.js
  21. 3 3
      desktop/core/src/desktop/js/ko/components/ko.sessionPanel.test.js
  22. 1 1
      desktop/core/src/desktop/js/parse/globalSearchParser.test.js
  23. 1 1
      desktop/core/src/desktop/js/parse/solrFormulaParser.test.js
  24. 1 1
      desktop/core/src/desktop/js/parse/solrQueryParser.test.js
  25. 0 294
      desktop/core/src/desktop/js/parse/spec/sqlTestUtils.js
  26. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Alter.test.js
  27. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Create.test.js
  28. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Drop.test.js
  29. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Error.test.js
  30. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Insert.test.js
  31. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Locations.test.js
  32. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Select.test.js
  33. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Set.test.js
  34. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Update.test.js
  35. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Use.test.js
  36. 1 3
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.test.js
  37. 4 4
      desktop/core/src/desktop/js/parse/sql/calcite/test/calciteSyntaxParser.test.js
  38. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Alter.test.js
  39. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Create.test.js
  40. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Drop.test.js
  41. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Error.test.js
  42. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Insert.test.js
  43. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Locations.test.js
  44. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Select.test.js
  45. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Set.test.js
  46. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Update.test.js
  47. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Use.test.js
  48. 1 3
      desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.test.js
  49. 4 4
      desktop/core/src/desktop/js/parse/sql/druid/test/druidSyntaxParser.test.js
  50. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Alter.test.js
  51. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Create.test.js
  52. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Drop.test.js
  53. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Error.test.js
  54. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Insert.test.js
  55. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Locations.test.js
  56. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Select.test.js
  57. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Set.test.js
  58. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Update.test.js
  59. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Use.test.js
  60. 1 3
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.test.js
  61. 4 4
      desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchSyntaxParser.test.js
  62. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Alter.test.js
  63. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Create.test.js
  64. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Drop.test.js
  65. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Error.test.js
  66. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Insert.test.js
  67. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Locations.test.js
  68. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Select.test.js
  69. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Set.test.js
  70. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Update.test.js
  71. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Use.test.js
  72. 1 3
      desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.test.js
  73. 4 4
      desktop/core/src/desktop/js/parse/sql/generic/test/genericSyntaxParser.test.js
  74. 1 3
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Alter.test.js
  75. 1 3
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Analyze.test.js
  76. 1 3
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Create.test.js
  77. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Describe.test.js
  78. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Drop.test.js
  79. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Error.test.js
  80. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Grant.test.js
  81. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.ImportExport.test.js
  82. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Insert.test.js
  83. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Load.test.js
  84. 1 3
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Locations.test.js
  85. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Select.test.js
  86. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Set.test.js
  87. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Show.test.js
  88. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Update.test.js
  89. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Use.test.js
  90. 1 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.test.js
  91. 4 4
      desktop/core/src/desktop/js/parse/sql/hive/test/hiveSyntaxParser.test.js
  92. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Alter.test.js
  93. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Analyze.test.js
  94. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Create.test.js
  95. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Describe.test.js
  96. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Drop.test.js
  97. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Error.test.js
  98. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Grant.test.js
  99. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Insert.test.js
  100. 1 3
      desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Load.test.js

+ 12 - 1
.babelrc

@@ -12,5 +12,16 @@
   },{
     "test": "./desktop/core/src/desktop/js/parse/sqlSyntaxParser.js",
     "compact": false
-  }]
+  }],
+  "env": {
+    "test": {
+      "presets": ["@babel/preset-env"],
+      "plugins": [
+        ["module-resolver", {
+          "root": ["./desktop/core/src/desktop/js"]
+        }],
+        "@babel/plugin-syntax-dynamic-import"
+      ]
+    }
+  }
 }

+ 2 - 2
.eslintrc.js

@@ -12,8 +12,8 @@ const hueGlobals = [
   // other misc
   'ace', 'CodeMirror', 'impalaDagre', 'less', 'MediumEditor', 'moment', 'Role', 'trackOnGA', '__webpack_public_path__',
 
-  // jasmine
-  'afterAll', 'afterEach', 'beforeAll', 'beforeEach', 'describe', 'expect', 'fail', 'fdescribe', 'fit', 'it', 'jasmine',
+  // jest
+  'afterAll', 'afterEach', 'beforeAll', 'beforeEach', 'describe', 'expect', 'fail', 'fdescribe', 'fit', 'it', 'jest',
   'spyOn', 'xdescribe', 'xit'
 ];
 

+ 1 - 1
desktop/core/src/desktop/js/api/spec/apiHelperSpec.js → desktop/core/src/desktop/js/api/apiHelper.test.js

@@ -14,7 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import apiHelper from '../apiHelper';
+import apiHelper from './apiHelper';
 
 describe('apiHelper.js', () => {
   const subject = apiHelper;

+ 1 - 1
desktop/core/src/desktop/js/apps/notebook/spec/aceAutocompleteWrapperSpec.js → desktop/core/src/desktop/js/apps/notebook/aceAutocompleteWrapper.test.js

@@ -16,7 +16,7 @@
 
 import ko from 'knockout';
 
-import AceAutocompleteWrapper from '../aceAutocompleteWrapper';
+import AceAutocompleteWrapper from './aceAutocompleteWrapper';
 
 describe('aceAutocompleteWrapper.js', () => {
   it('should not throw exceptions', done => {

+ 2 - 2
desktop/core/src/desktop/js/apps/notebook2/components/spec/ko.executableActions.spec.js → desktop/core/src/desktop/js/apps/notebook2/components/ko.executableActions.test.js

@@ -1,6 +1,6 @@
 import huePubSub from 'utils/huePubSub';
-import { koSetup } from 'spec/jasmineSetup';
-import { NAME } from '../ko.executableActions';
+import { koSetup } from 'jest/koTestUtils';
+import { NAME } from './ko.executableActions';
 import { EXECUTABLE_UPDATED_EVENT, EXECUTION_STATUS } from 'apps/notebook2/execution/executable';
 import { sleep } from 'utils/hueUtils';
 

+ 2 - 2
desktop/core/src/desktop/js/apps/notebook2/components/spec/ko.executableProgressBar.spec.js → desktop/core/src/desktop/js/apps/notebook2/components/ko.executableProgressBar.test.js

@@ -1,6 +1,6 @@
 import huePubSub from 'utils/huePubSub';
-import { koSetup } from 'spec/jasmineSetup';
-import { NAME } from '../ko.executableProgressBar';
+import { koSetup } from 'jest/koTestUtils';
+import { NAME } from './ko.executableProgressBar';
 import { EXECUTABLE_UPDATED_EVENT, EXECUTION_STATUS } from 'apps/notebook2/execution/executable';
 
 describe('ko.executableProgressBar.js', () => {

+ 3 - 3
desktop/core/src/desktop/js/apps/notebook2/execution/spec/executorSpec.js → desktop/core/src/desktop/js/apps/notebook2/execution/executor.test.js

@@ -17,8 +17,8 @@
 import $ from 'jquery';
 
 import ApiHelper from 'api/apiHelper';
-import { EXECUTION_STATUS } from 'apps/notebook2/execution/executable';
-import Executor from 'apps/notebook2/execution/executor';
+import { EXECUTION_STATUS } from './executable';
+import Executor from './executor';
 
 describe('executor.js', () => {
   /**
@@ -39,7 +39,7 @@ describe('executor.js', () => {
     const subject = createSubject('SELECT * FROM customers;');
 
     const simplePostDeferred = $.Deferred();
-    spyOn(ApiHelper, 'simplePost').and.callFake(url => {
+    jest.spyOn(ApiHelper, 'simplePost').mockImplementation(url => {
       expect(url).toEqual('/notebook/api/execute/impala');
       return simplePostDeferred;
     });

+ 10 - 4
desktop/core/src/desktop/js/apps/notebook2/execution/spec/sessionManagerSpec.js → desktop/core/src/desktop/js/apps/notebook2/execution/sessionManager.test.js

@@ -17,9 +17,10 @@
 import $ from 'jquery';
 
 import ApiHelper from 'api/apiHelper';
-import sessionManager from '../sessionManager';
+import sessionManager from './sessionManager';
 
 describe('sessionManager.js', () => {
+  let spy;
   beforeEach(() => {
     // sessionManager is a singleton so we need to clear out sessions between tests
     sessionManager.knownSessionPromises = {};
@@ -30,7 +31,7 @@ describe('sessionManager.js', () => {
       }
       return sessionCount[type]++;
     };
-    spyOn(ApiHelper, 'createSession').and.callFake(sessionDef =>
+    spy = jest.spyOn(ApiHelper, 'createSession').mockImplementation(async sessionDef =>
       Promise.resolve({
         session_id: sessionDef.type + '_' + getSessionCount(sessionDef.type),
         type: sessionDef.type
@@ -40,6 +41,7 @@ describe('sessionManager.js', () => {
 
   afterEach(() => {
     sessionManager.knownSessionPromises = {};
+    spy.mockClear();
   });
 
   it('should create detached sessions', async () => {
@@ -102,7 +104,7 @@ describe('sessionManager.js', () => {
     expect(sessionManager.hasSession('impala')).toBeTruthy();
 
     // Close the session
-    spyOn(ApiHelper, 'simplePost').and.callFake((url, data, options) => {
+    const postSpy = jest.spyOn(ApiHelper, 'simplePost').mockImplementation((url, data, options) => {
       expect(JSON.parse(data.session).session_id).toEqual(session.session_id);
       expect(options.silenceErrors).toBeTruthy();
       expect(url).toEqual('/notebook/api/close_session');
@@ -113,6 +115,7 @@ describe('sessionManager.js', () => {
     expect(sessionManager.hasSession('impala')).toBeFalsy();
     expect(ApiHelper.createSession).toHaveBeenCalledTimes(1);
     expect(ApiHelper.simplePost).toHaveBeenCalledTimes(1);
+    postSpy.mockClear();
   });
 
   it('should be able to restart sessions', async () => {
@@ -125,7 +128,9 @@ describe('sessionManager.js', () => {
     expect(sessionManager.hasSession('impala')).toBeTruthy();
 
     // Restart the session
-    spyOn(ApiHelper, 'simplePost').and.returnValue(new $.Deferred().resolve().promise());
+    const postSpy = jest
+      .spyOn(ApiHelper, 'simplePost')
+      .mockReturnValue(new $.Deferred().resolve().promise());
     session = await sessionManager.restartSession(session);
 
     expect(session.session_id).toEqual('impala_1');
@@ -133,5 +138,6 @@ describe('sessionManager.js', () => {
 
     expect(ApiHelper.createSession).toHaveBeenCalledTimes(2);
     expect(ApiHelper.simplePost).toHaveBeenCalledTimes(1);
+    postSpy.mockClear();
   });
 });

+ 7 - 7
desktop/core/src/desktop/js/apps/notebook2/execution/spec/sqlExecutableSpec.js → desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.test.js

@@ -17,9 +17,9 @@
 import $ from 'jquery';
 
 import ApiHelper from 'api/apiHelper';
-import SqlExecutable from '../sqlExecutable';
-import { EXECUTION_STATUS } from 'apps/notebook2/execution/executable';
-import sessionManager from 'apps/notebook2/execution/sessionManager';
+import SqlExecutable from './sqlExecutable';
+import { EXECUTION_STATUS } from './executable';
+import sessionManager from './sessionManager';
 
 describe('sqlExecutable.js', () => {
   afterEach(() => {
@@ -64,7 +64,7 @@ describe('sqlExecutable.js', () => {
     const subject = createSubject('SELECT * FROM customers');
 
     const simplePostDeferred = $.Deferred();
-    spyOn(ApiHelper, 'simplePost').and.callFake(url => {
+    jest.spyOn(ApiHelper, 'simplePost').mockImplementation(url => {
       expect(url).toEqual('/notebook/api/execute/impala');
       return simplePostDeferred;
     });
@@ -87,14 +87,14 @@ describe('sqlExecutable.js', () => {
 
     const simplePostDeferred = $.Deferred();
 
-    spyOn(ApiHelper, 'createSession').and.callFake(
+    jest.spyOn(ApiHelper, 'createSession').mockImplementation(
       () =>
         new Promise(resolve => {
           resolve({ type: 'x' });
         })
     );
 
-    spyOn(ApiHelper, 'simplePost').and.callFake(url => {
+    jest.spyOn(ApiHelper, 'simplePost').mockImplementation(url => {
       expect(url).toEqual('/notebook/api/execute/impala');
       return simplePostDeferred;
     });
@@ -117,7 +117,7 @@ describe('sqlExecutable.js', () => {
 
     const simplePostExeuteDeferred = $.Deferred();
     const simplePostCancelDeferred = $.Deferred();
-    spyOn(ApiHelper, 'simplePost').and.callFake(url => {
+    jest.spyOn(ApiHelper, 'simplePost').mockImplementation(url => {
       if (url === '/notebook/api/execute/impala') {
         return simplePostExeuteDeferred;
       } else if (url === '/notebook/api/cancel_statement') {

+ 2 - 2
desktop/core/src/desktop/js/apps/notebook2/spec/notebookSpec.js → desktop/core/src/desktop/js/apps/notebook2/notebook.test.js

@@ -14,7 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import Notebook from '../notebook';
+import Notebook from './notebook';
 import sessionManager from 'apps/notebook2/execution/sessionManager';
 
 describe('notebook.js', () => {
@@ -34,7 +34,7 @@ describe('notebook.js', () => {
   };
 
   beforeEach(() => {
-    spyOn(sessionManager, 'getSession').and.callFake(() => Promise.resolve());
+    jest.spyOn(sessionManager, 'getSession').mockImplementation(() => Promise.resolve());
   });
 
   it('should serialize a notebook to JSON', async () => {

+ 2 - 2
desktop/core/src/desktop/js/apps/notebook2/spec/snippetSpec.js → desktop/core/src/desktop/js/apps/notebook2/snippet.test.js

@@ -14,7 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import Notebook from '../notebook';
+import Notebook from './notebook';
 import sessionManager from 'apps/notebook2/execution/sessionManager';
 
 describe('snippet.js', () => {
@@ -34,7 +34,7 @@ describe('snippet.js', () => {
   };
 
   beforeEach(() => {
-    spyOn(sessionManager, 'getSession').and.callFake(() => Promise.resolve());
+    jest.spyOn(sessionManager, 'getSession').mockImplementation(() => Promise.resolve());
   });
 
   it('should serialize a snippet context to JSON', async () => {

+ 5 - 0
desktop/core/src/desktop/js/spec/globalJsConstants.js → desktop/core/src/desktop/js/jest/jest.init.js

@@ -15,7 +15,12 @@
 // limitations under the License.
 
 // Ensure singletons
+import 'core-js/stable';
+import 'regenerator-runtime/runtime';
+
 import 'apps/notebook2/execution/sessionManager';
+import './jquery.setup';
+import './sqlTestUtils';
 
 const globalVars = {
   LOGGED_USERNAME: 'foo',

+ 2 - 0
desktop/core/src/desktop/js/spec/jquery.test.js → desktop/core/src/desktop/js/jest/jquery.setup.js

@@ -15,6 +15,8 @@
 // limitations under the License.
 
 import $ from 'jquery';
+import 'jquery.cookie';
+import 'ext/jquery.total-storage.1.1.3.min';
 
 global.$ = $;
 global.jQuery = $;

+ 0 - 24
desktop/core/src/desktop/js/spec/jasmineSetup.js → desktop/core/src/desktop/js/jest/koTestUtils.js

@@ -14,32 +14,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import JasmineCore from 'jasmine-core';
-import { JSDOM } from 'jsdom';
 import ko from 'knockout';
 
-const jsdom = new JSDOM('<!doctype html><html><body></body></html>', {
-  url: 'https://www.gethue.com/hue',
-  contentType: 'text/html',
-  includeNodeLocations: true,
-  storageQuota: 10000000
-});
-
-const { window } = jsdom;
-
-global.document = window.document;
-global.window = window;
-global.self = global;
-global.navigator = {
-  userAgent: 'node.js'
-};
-global.localStorage = window.localStorage;
-global.sessionStorage = window.sessionStorage;
-
-global.getJasmineRequireObj = function() {
-  return JasmineCore;
-};
-
 export const koSetup = () => {
   let originalLoadTemplate;
   let wrapper;

+ 280 - 0
desktop/core/src/desktop/js/jest/sqlTestUtils.js

@@ -0,0 +1,280 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Needed to compare by val without taking attr order into account
+const resultEquals = function(a, b) {
+  if (typeof a !== typeof b) {
+    return false;
+  }
+  if (a === b) {
+    return true;
+  }
+  if (typeof a === 'object') {
+    const aKeys = Object.keys(a);
+    if (aKeys.length !== Object.keys(b).length) {
+      return false;
+    }
+    for (let i = 0; i < aKeys.length; i++) {
+      if (!resultEquals(a[aKeys[i]], b[aKeys[i]])) {
+        return false;
+      }
+    }
+    return true;
+  } else {
+    // TODO: Jasmine version?
+    return jasmine.jasmine.matchersUtil.equals(a, b);
+  }
+};
+
+const jsonStringToJsString = function(jsonString) {
+  return jsonString
+    .replace(/'([a-zA-Z]+)':/g, (all, group) => {
+      return group + ':';
+    })
+    .replace(/([:{,])/g, (all, group) => {
+      return group + ' ';
+    })
+    .replace(/[}]/g, ' }')
+    .replace(/["]/g, "'")
+    .replace(/'([a-z_]+)':/gi, '$1:');
+};
+
+expect.extend({
+  toEqualAutocompleteValues(actualItems, expectedValues) {
+    if (actualItems.length !== expectedValues.length) {
+      return { pass: false };
+    }
+
+    for (let i = 0; i < expectedValues.length; i++) {
+      const stringValue =
+        typeof actualItems[i] !== 'string' ? '' + actualItems[i].value : actualItems[i].value;
+      if (stringValue !== expectedValues[i]) {
+        return { pass: false };
+      }
+    }
+    return { pass: true };
+  },
+  toEqualDefinition(actualResponse, testDefinition) {
+    if (typeof testDefinition.noErrors === 'undefined' && actualResponse.errors) {
+      let allRecoverable = true;
+      actualResponse.errors.forEach(error => {
+        allRecoverable = allRecoverable && error.recoverable;
+      });
+      if (allRecoverable) {
+        delete actualResponse.errors;
+      }
+    }
+
+    if (
+      ((testDefinition.expectedResult && testDefinition.expectedResult.locations) ||
+        testDefinition.expectedLocations) &&
+      actualResponse.locations
+    ) {
+      const expectedLoc =
+        testDefinition.expectedLocations || testDefinition.expectedResult.locations;
+      const expectsType = expectedLoc.some(location => location.type === 'statementType');
+      if (!expectsType) {
+        actualResponse.locations = actualResponse.locations.filter(
+          location => location.type !== 'statementType'
+        );
+      }
+    }
+
+    if (testDefinition.expectedDefinitions) {
+      if (!resultEquals(actualResponse.definitions, testDefinition.expectedDefinitions)) {
+        return {
+          pass: false,
+          message:
+            '\n        Statement: ' +
+            testDefinition.beforeCursor +
+            '|' +
+            testDefinition.afterCursor +
+            '\n' +
+            'Expected definitions: ' +
+            jsonStringToJsString(JSON.stringify(testDefinition.expectedDefinitions)) +
+            '\n' +
+            '  Parser definitions: ' +
+            jsonStringToJsString(JSON.stringify(actualResponse.definitions)) +
+            '\n'
+        };
+      }
+    } else {
+      delete actualResponse.definitions;
+    }
+
+    if (testDefinition.locationsOnly) {
+      return {
+        pass: resultEquals(actualResponse.locations, testDefinition.expectedLocations),
+        message:
+          '\n        Statement: ' +
+          testDefinition.beforeCursor +
+          '|' +
+          testDefinition.afterCursor +
+          '\n' +
+          'Expected locations: ' +
+          jsonStringToJsString(JSON.stringify(testDefinition.expectedLocations)) +
+          '\n' +
+          '  Parser locations: ' +
+          jsonStringToJsString(JSON.stringify(actualResponse.locations)) +
+          '\n'
+      };
+    }
+
+    if (actualResponse.suggestKeywords) {
+      const weightFreeKeywords = [];
+      actualResponse.suggestKeywords.forEach(keyword => {
+        weightFreeKeywords.push(keyword.value);
+      });
+      actualResponse.suggestKeywords = weightFreeKeywords;
+    }
+
+    if (!!testDefinition.noLocations) {
+      if (actualResponse.locations.length > 0) {
+        return {
+          pass: false,
+          message:
+            '\nStatement: ' +
+            testDefinition.beforeCursor +
+            '|' +
+            testDefinition.afterCursor +
+            '\n' +
+            '           Expected no locations, found ' +
+            actualResponse.locations.length
+        };
+      }
+    }
+    if (typeof testDefinition.expectedResult.locations === 'undefined') {
+      delete actualResponse.locations;
+    }
+    let deleteKeywords = false;
+    if (testDefinition.containsColRefKeywords) {
+      if (typeof actualResponse.suggestColRefKeywords == 'undefined') {
+        return {
+          pass: false,
+          message:
+            '\nStatement: ' +
+            testDefinition.beforeCursor +
+            '|' +
+            testDefinition.afterCursor +
+            '\n' +
+            '           No colRef keywords found'
+        };
+      } else if (testDefinition.containsColRefKeywords !== true) {
+        let contains = true;
+        testDefinition.containsColRefKeywords.forEach(keyword => {
+          contains =
+            contains &&
+            (actualResponse.suggestColRefKeywords.BOOLEAN.indexOf(keyword) !== -1 ||
+              actualResponse.suggestColRefKeywords.NUMBER.indexOf(keyword) !== -1 ||
+              actualResponse.suggestColRefKeywords.STRING.indexOf(keyword) !== -1);
+        });
+        if (!contains) {
+          return {
+            pass: false,
+            message:
+              '\nStatement: ' +
+              testDefinition.beforeCursor +
+              '|' +
+              testDefinition.afterCursor +
+              '\n' +
+              '           Expected colRef keywords not found ' +
+              'Expected keywords: ' +
+              JSON.stringify(testDefinition.containsColRefKeywords) +
+              '\n' +
+              '  Parser keywords: ' +
+              JSON.stringify(actualResponse.suggestColRefKeywords) +
+              '\n'
+          };
+        }
+      }
+      delete actualResponse.suggestColRefKeywords;
+    }
+
+    if (typeof testDefinition.containsKeywords !== 'undefined') {
+      const keywords = actualResponse.suggestKeywords;
+      let contains = true;
+      testDefinition.containsKeywords.forEach(keyword => {
+        if (typeof keywords === 'undefined' || keywords.indexOf(keyword) === -1) {
+          contains = false;
+          return false;
+        }
+      });
+      if (!contains) {
+        return {
+          pass: false,
+          message:
+            '\n        Statement: ' +
+            testDefinition.beforeCursor +
+            '|' +
+            testDefinition.afterCursor +
+            '\n' +
+            'Expected keywords: ' +
+            JSON.stringify(testDefinition.containsKeywords) +
+            '\n' +
+            '  Parser keywords: ' +
+            JSON.stringify(keywords) +
+            '\n'
+        };
+      }
+      deleteKeywords = true;
+    }
+    if (typeof testDefinition.doesNotContainKeywords !== 'undefined') {
+      const keywords = actualResponse.suggestKeywords;
+      let contains = false;
+      testDefinition.doesNotContainKeywords.forEach(keyword => {
+        if (typeof keywords === 'undefined' || keywords.indexOf(keyword) !== -1) {
+          contains = true;
+          return false;
+        }
+      });
+      if (contains) {
+        return {
+          pass: false,
+          message:
+            '\n            Statement: ' +
+            testDefinition.beforeCursor +
+            '|' +
+            testDefinition.afterCursor +
+            '\n' +
+            'Not expected keywords: ' +
+            JSON.stringify(testDefinition.doesNotContainKeywords) +
+            '\n' +
+            '      Parser keywords: ' +
+            JSON.stringify(keywords) +
+            '\n'
+        };
+      }
+      deleteKeywords = true;
+    }
+
+    if (deleteKeywords) {
+      delete actualResponse.suggestKeywords;
+    }
+    return {
+      pass: resultEquals(actualResponse, testDefinition.expectedResult),
+      message:
+        '\n        Statement: ' +
+        testDefinition.beforeCursor +
+        '|' +
+        testDefinition.afterCursor +
+        '\n' +
+        'Expected response: ' +
+        jsonStringToJsString(JSON.stringify(testDefinition.expectedResult) + '\n') +
+        '  Parser response: ' +
+        jsonStringToJsString(JSON.stringify(actualResponse) + '\n')
+    };
+  }
+});

+ 2 - 2
desktop/core/src/desktop/js/ko/bindings/test/ko.toogle.spec.js → desktop/core/src/desktop/js/ko/bindings/ko.toogle.test.js

@@ -15,8 +15,8 @@
 // limitations under the License.
 
 import ko from 'knockout';
-import { koSetup } from 'spec/jasmineSetup';
-import '../ko.toggle';
+import { koSetup } from 'jest/koTestUtils';
+import './ko.toggle';
 
 describe('ko.toggle.js', () => {
   const setup = koSetup();

+ 72 - 0
desktop/core/src/desktop/js/ko/components/assist/assistStorageEntry.test.js

@@ -0,0 +1,72 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// 'License'); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an 'AS IS' BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import AssistStorageEntry from './assistStorageEntry';
+
+describe('assistStorageEntry.js', () => {
+  it('it should handle domain in ADLS/ABFS', () => {
+    const spy = jest.spyOn($, 'ajax').mockImplementation(data => {
+      const url = data.url;
+      const deferred = $.Deferred();
+
+      if (
+        url ===
+        '/filebrowser/view=ABFS%3A%2F%2F?format=json&sortby=name&descending=false&pagesize=100&pagenum=1'
+      ) {
+        deferred.resolve({
+          status: 200,
+          contentType: 'application/json',
+          responseText: JSON.stringify({
+            status: 0,
+            files: [{ name: 'path' }],
+            page: { next_page_number: 0 }
+          })
+        });
+      } else if (
+        url ===
+        '/filebrowser/view=ABFS%3A%2F%2Fpath?format=json&sortby=name&descending=false&pagesize=100&pagenum=1'
+      ) {
+        deferred.resolve({
+          status: 200,
+          contentType: 'application/json',
+          responseText: JSON.stringify({
+            status: 0,
+            files: [{ name: 'p2' }],
+            page: { next_page_number: 0 }
+          })
+        });
+      } else {
+        deferred.reject();
+      }
+
+      return deferred.promise();
+    });
+
+    AssistStorageEntry.getEntry('abfs://test.com/path').always(entry => {
+      expect(entry.path).toBe('/path');
+    });
+    AssistStorageEntry.getEntry('abfs://path').always(entry => {
+      expect(entry.path).toBe('/path');
+    });
+    AssistStorageEntry.getEntry('abfs://path@test.com').always(entry => {
+      expect(entry.path).toBe('/path');
+    });
+    AssistStorageEntry.getEntry('abfs://path@test.com/p2').always(entry => {
+      expect(entry.path).toBe('/path/p2');
+    });
+    spy.mockClear();
+  });
+});

+ 1 - 3
desktop/core/src/desktop/js/ko/components/assist/spec/ko.assistFunctionsPanelSpec.js → desktop/core/src/desktop/js/ko/components/assist/ko.assistFunctionsPanel.test.js

@@ -15,11 +15,9 @@
 // limitations under the License.
 
 import huePubSub from 'utils/huePubSub';
-import AssistFunctionsPanel from '../ko.assistFunctionsPanel';
+import AssistFunctionsPanel from './ko.assistFunctionsPanel';
 
 describe('ko.assistFunctionsPanel.js', () => {
-  beforeAll(() => {});
-
   it('should handle cluster config updates', () => {
     let clusterConfigGetCalled = false;
     const configSub = huePubSub.subscribe('cluster.config.get.config', () => {

+ 1 - 1
desktop/core/src/desktop/js/ko/components/assist/spec/ko.assistLangRefPanelSpec.js → desktop/core/src/desktop/js/ko/components/assist/ko.assistLangRefPanel.test.js

@@ -15,7 +15,7 @@
 // limitations under the License.
 
 import huePubSub from 'utils/huePubSub';
-import AssistLangRefPanel from '../ko.assistLangRefPanel';
+import AssistLangRefPanel from './ko.assistLangRefPanel';
 
 describe('ko.assistLangRefPanel.js', () => {
   beforeAll(() => {

+ 0 - 77
desktop/core/src/desktop/js/ko/components/assist/spec/assistStorageEntrySpec.js

@@ -1,77 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you under the Apache License, Version 2.0 (the
-// 'License'); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an 'AS IS' BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-import AssistStorageEntry from 'ko/components/assist/assistStorageEntry';
-
-describe('assistStorageEntry.js', () => {
-  beforeAll(() => {});
-
-  beforeEach(() => {
-    jasmine.Ajax.install();
-  });
-
-  afterEach(() => {
-    jasmine.Ajax.uninstall();
-  });
-
-  it('it should handle domain in ADLS/ABFS', () => {
-    jasmine.Ajax.stubRequest(
-      '/filebrowser/view=ABFS%3A%2F%2F?format=json&sortby=name&descending=false&pagesize=100&pagenum=1'
-    ).andReturn({
-      status: 200,
-      contentType: 'application/json',
-      responseText: JSON.stringify({
-        status: 0,
-        files: [{ name: 'path' }],
-        page: { next_page_number: 0 }
-      })
-    });
-    AssistStorageEntry.getEntry('abfs://test.com/path').always(entry => {
-      expect(entry.path).toBe('/path');
-    });
-    AssistStorageEntry.getEntry('abfs://path').always(entry => {
-      expect(entry.path).toBe('/path');
-    });
-    AssistStorageEntry.getEntry('abfs://path@test.com').always(entry => {
-      expect(entry.path).toBe('/path');
-    });
-    jasmine.Ajax.stubRequest(
-      '/filebrowser/view=ABFS%3A%2F%2F?format=json&sortby=name&descending=false&pagesize=100&pagenum=1'
-    ).andReturn({
-      status: 200,
-      contentType: 'application/json',
-      responseText: JSON.stringify({
-        status: 0,
-        files: [{ name: 'p1' }],
-        page: { next_page_number: 0 }
-      })
-    });
-    jasmine.Ajax.stubRequest(
-      '/filebrowser/view=ABFS%3A%2F%2Fp1?format=json&sortby=name&descending=false&pagesize=100&pagenum=1'
-    ).andReturn({
-      status: 200,
-      contentType: 'application/json',
-      responseText: JSON.stringify({
-        status: 0,
-        files: [{ name: 'p2' }],
-        page: { next_page_number: 0 }
-      })
-    });
-    AssistStorageEntry.getEntry('abfs://p1@test.com/p2').always(entry => {
-      expect(entry.path).toBe('/p1/p2');
-    });
-  });
-});

+ 3 - 3
desktop/core/src/desktop/js/ko/components/spec/ko.sessionPanel.spec.js → desktop/core/src/desktop/js/ko/components/ko.sessionPanel.test.js

@@ -16,8 +16,8 @@
 
 import huePubSub from 'utils/huePubSub';
 import sessionManager from 'apps/notebook2/execution/sessionManager';
-import { koSetup } from 'spec/jasmineSetup';
-import { NAME, SESSION_PANEL_SHOW_EVENT } from '../ko.sessionPanel';
+import { koSetup } from 'jest/koTestUtils';
+import { NAME, SESSION_PANEL_SHOW_EVENT } from './ko.sessionPanel';
 
 describe('ko.sessionPanel.js', () => {
   const setup = koSetup();
@@ -31,7 +31,7 @@ describe('ko.sessionPanel.js', () => {
   it('should be visible on publish event', async () => {
     const wrapper = await setup.renderComponent(NAME, {});
     const sessionPanelElement = wrapper.querySelector('[data-test="' + NAME + '"]');
-    spyOn(sessionManager, 'getAllSessions').and.returnValue(Promise.resolve([]));
+    jest.spyOn(sessionManager, 'getAllSessions').mockReturnValue(Promise.resolve([]));
 
     // Initially hidden
     expect(sessionPanelElement.style['display']).toEqual('none');

+ 1 - 1
desktop/core/src/desktop/js/parse/spec/globalSearchParserSpec.js → desktop/core/src/desktop/js/parse/globalSearchParser.test.js

@@ -14,7 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import globalSearchParser from '../globalSearchParser';
+import globalSearchParser from './globalSearchParser';
 
 describe('globalSearchParser.js', () => {
   const testParser = function(beforeCursor, afterCursor, expectedResult) {

+ 1 - 1
desktop/core/src/desktop/js/parse/spec/solrFormulaParserSpec.js → desktop/core/src/desktop/js/parse/solrFormulaParser.test.js

@@ -14,7 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import solrFormulaParser from '../solrFormulaParser';
+import solrFormulaParser from './solrFormulaParser';
 
 describe('solrFormulaParser.js', () => {
   describe('autocomplete', () => {

+ 1 - 1
desktop/core/src/desktop/js/parse/spec/solrQueryParserSpec.js → desktop/core/src/desktop/js/parse/solrQueryParser.test.js

@@ -14,7 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import solrQueryParser from '../solrQueryParser';
+import solrQueryParser from './solrQueryParser';
 
 describe('solrQueryParser.js', () => {
   const testAutocomplete = function(beforeCursor, afterCursor, expectedResult) {

+ 0 - 294
desktop/core/src/desktop/js/parse/spec/sqlTestUtils.js

@@ -1,294 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Needed to compare by val without taking attr order into account
-const resultEquals = function(a, b) {
-  if (typeof a !== typeof b) {
-    return false;
-  }
-  if (a === b) {
-    return true;
-  }
-  if (typeof a === 'object') {
-    const aKeys = Object.keys(a);
-    if (aKeys.length !== Object.keys(b).length) {
-      return false;
-    }
-    for (let i = 0; i < aKeys.length; i++) {
-      if (!resultEquals(a[aKeys[i]], b[aKeys[i]])) {
-        return false;
-      }
-    }
-    return true;
-  } else {
-    // TODO: Jasmine version?
-    return jasmine.jasmine.matchersUtil.equals(a, b);
-  }
-};
-
-const jsonStringToJsString = function(jsonString) {
-  return jsonString
-    .replace(/'([a-zA-Z]+)':/g, (all, group) => {
-      return group + ':';
-    })
-    .replace(/([:{,])/g, (all, group) => {
-      return group + ' ';
-    })
-    .replace(/[}]/g, ' }')
-    .replace(/["]/g, "'")
-    .replace(/'([a-z_]+)':/gi, '$1:');
-};
-
-const testUtils = {
-  autocompleteMatcher: {
-    toEqualAutocompleteValues: function() {
-      return {
-        compare: function(actualItems, expectedValues) {
-          if (actualItems.length !== expectedValues.length) {
-            return { pass: false };
-          }
-
-          for (let i = 0; i < expectedValues.length; i++) {
-            const stringValue =
-              typeof actualItems[i] !== 'string' ? '' + actualItems[i].value : actualItems[i].value;
-            if (stringValue !== expectedValues[i]) {
-              return { pass: false };
-            }
-          }
-          return { pass: true };
-        }
-      };
-    }
-  },
-  testDefinitionMatcher: {
-    toEqualDefinition: function() {
-      return {
-        compare: function(actualResponse, testDefinition) {
-          if (typeof testDefinition.noErrors === 'undefined' && actualResponse.errors) {
-            let allRecoverable = true;
-            actualResponse.errors.forEach(error => {
-              allRecoverable = allRecoverable && error.recoverable;
-            });
-            if (allRecoverable) {
-              delete actualResponse.errors;
-            }
-          }
-
-          if (
-            ((testDefinition.expectedResult && testDefinition.expectedResult.locations) ||
-              testDefinition.expectedLocations) &&
-            actualResponse.locations
-          ) {
-            const expectedLoc =
-              testDefinition.expectedLocations || testDefinition.expectedResult.locations;
-            const expectsType = expectedLoc.some(location => location.type === 'statementType');
-            if (!expectsType) {
-              actualResponse.locations = actualResponse.locations.filter(
-                location => location.type !== 'statementType'
-              );
-            }
-          }
-
-          if (testDefinition.expectedDefinitions) {
-            if (!resultEquals(actualResponse.definitions, testDefinition.expectedDefinitions)) {
-              return {
-                pass: false,
-                message:
-                  '\n        Statement: ' +
-                  testDefinition.beforeCursor +
-                  '|' +
-                  testDefinition.afterCursor +
-                  '\n' +
-                  'Expected definitions: ' +
-                  jsonStringToJsString(JSON.stringify(testDefinition.expectedDefinitions)) +
-                  '\n' +
-                  '  Parser definitions: ' +
-                  jsonStringToJsString(JSON.stringify(actualResponse.definitions)) +
-                  '\n'
-              };
-            }
-          } else {
-            delete actualResponse.definitions;
-          }
-
-          if (testDefinition.locationsOnly) {
-            return {
-              pass: resultEquals(actualResponse.locations, testDefinition.expectedLocations),
-              message:
-                '\n        Statement: ' +
-                testDefinition.beforeCursor +
-                '|' +
-                testDefinition.afterCursor +
-                '\n' +
-                'Expected locations: ' +
-                jsonStringToJsString(JSON.stringify(testDefinition.expectedLocations)) +
-                '\n' +
-                '  Parser locations: ' +
-                jsonStringToJsString(JSON.stringify(actualResponse.locations)) +
-                '\n'
-            };
-          }
-
-          if (actualResponse.suggestKeywords) {
-            const weightFreeKeywords = [];
-            actualResponse.suggestKeywords.forEach(keyword => {
-              weightFreeKeywords.push(keyword.value);
-            });
-            actualResponse.suggestKeywords = weightFreeKeywords;
-          }
-
-          if (!!testDefinition.noLocations) {
-            if (actualResponse.locations.length > 0) {
-              return {
-                pass: false,
-                message:
-                  '\nStatement: ' +
-                  testDefinition.beforeCursor +
-                  '|' +
-                  testDefinition.afterCursor +
-                  '\n' +
-                  '           Expected no locations, found ' +
-                  actualResponse.locations.length
-              };
-            }
-          }
-          if (typeof testDefinition.expectedResult.locations === 'undefined') {
-            delete actualResponse.locations;
-          }
-          let deleteKeywords = false;
-          if (testDefinition.containsColRefKeywords) {
-            if (typeof actualResponse.suggestColRefKeywords == 'undefined') {
-              return {
-                pass: false,
-                message:
-                  '\nStatement: ' +
-                  testDefinition.beforeCursor +
-                  '|' +
-                  testDefinition.afterCursor +
-                  '\n' +
-                  '           No colRef keywords found'
-              };
-            } else if (testDefinition.containsColRefKeywords !== true) {
-              let contains = true;
-              testDefinition.containsColRefKeywords.forEach(keyword => {
-                contains =
-                  contains &&
-                  (actualResponse.suggestColRefKeywords.BOOLEAN.indexOf(keyword) !== -1 ||
-                    actualResponse.suggestColRefKeywords.NUMBER.indexOf(keyword) !== -1 ||
-                    actualResponse.suggestColRefKeywords.STRING.indexOf(keyword) !== -1);
-              });
-              if (!contains) {
-                return {
-                  pass: false,
-                  message:
-                    '\nStatement: ' +
-                    testDefinition.beforeCursor +
-                    '|' +
-                    testDefinition.afterCursor +
-                    '\n' +
-                    '           Expected colRef keywords not found ' +
-                    'Expected keywords: ' +
-                    JSON.stringify(testDefinition.containsColRefKeywords) +
-                    '\n' +
-                    '  Parser keywords: ' +
-                    JSON.stringify(actualResponse.suggestColRefKeywords) +
-                    '\n'
-                };
-              }
-            }
-            delete actualResponse.suggestColRefKeywords;
-          }
-
-          if (typeof testDefinition.containsKeywords !== 'undefined') {
-            const keywords = actualResponse.suggestKeywords;
-            let contains = true;
-            testDefinition.containsKeywords.forEach(keyword => {
-              if (typeof keywords === 'undefined' || keywords.indexOf(keyword) === -1) {
-                contains = false;
-                return false;
-              }
-            });
-            if (!contains) {
-              return {
-                pass: false,
-                message:
-                  '\n        Statement: ' +
-                  testDefinition.beforeCursor +
-                  '|' +
-                  testDefinition.afterCursor +
-                  '\n' +
-                  'Expected keywords: ' +
-                  JSON.stringify(testDefinition.containsKeywords) +
-                  '\n' +
-                  '  Parser keywords: ' +
-                  JSON.stringify(keywords) +
-                  '\n'
-              };
-            }
-            deleteKeywords = true;
-          }
-          if (typeof testDefinition.doesNotContainKeywords !== 'undefined') {
-            const keywords = actualResponse.suggestKeywords;
-            let contains = false;
-            testDefinition.doesNotContainKeywords.forEach(keyword => {
-              if (typeof keywords === 'undefined' || keywords.indexOf(keyword) !== -1) {
-                contains = true;
-                return false;
-              }
-            });
-            if (contains) {
-              return {
-                pass: false,
-                message:
-                  '\n            Statement: ' +
-                  testDefinition.beforeCursor +
-                  '|' +
-                  testDefinition.afterCursor +
-                  '\n' +
-                  'Not expected keywords: ' +
-                  JSON.stringify(testDefinition.doesNotContainKeywords) +
-                  '\n' +
-                  '      Parser keywords: ' +
-                  JSON.stringify(keywords) +
-                  '\n'
-              };
-            }
-            deleteKeywords = true;
-          }
-
-          if (deleteKeywords) {
-            delete actualResponse.suggestKeywords;
-          }
-          return {
-            pass: resultEquals(actualResponse, testDefinition.expectedResult),
-            message:
-              '\n        Statement: ' +
-              testDefinition.beforeCursor +
-              '|' +
-              testDefinition.afterCursor +
-              '\n' +
-              'Expected response: ' +
-              jsonStringToJsString(JSON.stringify(testDefinition.expectedResult) + '\n') +
-              '  Parser response: ' +
-              jsonStringToJsString(JSON.stringify(actualResponse) + '\n')
-          };
-        }
-      };
-    }
-  }
-};
-
-export default testUtils;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Alter_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Alter.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js ALTER statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js ALTER statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Create_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Create.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js CREATE statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js CREATE statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Drop_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Drop.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js DROP statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js DROP statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Error_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Error.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js Error statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js Error statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Insert_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Insert.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js INSERT statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js INSERT statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Locations_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Locations.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 // prettier-ignore-start
@@ -23,8 +22,7 @@ describe('calciteAutocompleteParser.js locations', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = true;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Select_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Select.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js SELECT statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js SELECT statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Set_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Set.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js SET statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js SET statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Update_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Update.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js UPDATE statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js UPDATE statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParser_Use_Spec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.Use.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js USE statements', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js USE statements', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteAutocompleteParserSpec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteAutocompleteParser.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import calciteAutocompleteParser from '../calciteAutocompleteParser';
 
 describe('calciteAutocompleteParser.js', () => {
@@ -22,8 +21,7 @@ describe('calciteAutocompleteParser.js', () => {
     calciteAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 4 - 4
desktop/core/src/desktop/js/parse/sql/calcite/spec/calciteSyntaxParserSpec.js → desktop/core/src/desktop/js/parse/sql/calcite/test/calciteSyntaxParser.test.js

@@ -172,8 +172,8 @@ describe('calciteSyntaxParser.js', () => {
     const resultA = calciteSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = calciteSyntaxParser.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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).toEqual(resultB.ruleId);
   };
 
@@ -181,8 +181,8 @@ describe('calciteSyntaxParser.js', () => {
     const resultA = calciteSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = calciteSyntaxParser.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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);
   };
 

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Alter_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Alter.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js ALTER statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js ALTER statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Create_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Create.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js CREATE statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js CREATE statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Drop_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Drop.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js DROP statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js DROP statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Error_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Error.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js Error statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js Error statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Insert_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Insert.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js INSERT statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js INSERT statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Locations_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Locations.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 // prettier-ignore-start
@@ -23,8 +22,7 @@ describe('druidAutocompleteParser.js locations', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = true;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Select_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Select.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js SELECT statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js SELECT statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Set_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Set.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js SET statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js SET statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Update_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Update.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js UPDATE statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js UPDATE statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParser_Use_Spec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.Use.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js USE statements', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js USE statements', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/druid/spec/druidAutocompleteParserSpec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidAutocompleteParser.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import druidAutocompleteParser from '../druidAutocompleteParser';
 
 describe('druidAutocompleteParser.js', () => {
@@ -22,8 +21,7 @@ describe('druidAutocompleteParser.js', () => {
     druidAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 4 - 4
desktop/core/src/desktop/js/parse/sql/druid/spec/druidSyntaxParserSpec.js → desktop/core/src/desktop/js/parse/sql/druid/test/druidSyntaxParser.test.js

@@ -172,8 +172,8 @@ describe('druidSyntaxParser.js', () => {
     const resultA = druidSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = druidSyntaxParser.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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).toEqual(resultB.ruleId);
   };
 
@@ -181,8 +181,8 @@ describe('druidSyntaxParser.js', () => {
     const resultA = druidSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = druidSyntaxParser.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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);
   };
 

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Alter_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Alter.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js ALTER statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js ALTER statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Create_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Create.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js CREATE statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js CREATE statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Drop_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Drop.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js DROP statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js DROP statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Error_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Error.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js Error statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js Error statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Insert_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Insert.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js INSERT statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js INSERT statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Locations_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Locations.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 // prettier-ignore-start
@@ -23,8 +22,7 @@ describe('elasticsearchAutocompleteParser.js locations', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = true;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Select_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Select.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js SELECT statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js SELECT statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Set_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Set.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js SET statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js SET statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Update_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Update.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js UPDATE statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js UPDATE statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParser_Use_Spec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.Use.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js USE statements', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js USE statements', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchAutocompleteParserSpec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchAutocompleteParser.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import elasticsearchAutocompleteParser from '../elasticsearchAutocompleteParser';
 
 describe('elasticsearchAutocompleteParser.js', () => {
@@ -22,8 +21,7 @@ describe('elasticsearchAutocompleteParser.js', () => {
     elasticsearchAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 4 - 4
desktop/core/src/desktop/js/parse/sql/elasticsearch/spec/elasticsearchSyntaxParserSpec.js → desktop/core/src/desktop/js/parse/sql/elasticsearch/test/elasticsearchSyntaxParser.test.js

@@ -172,8 +172,8 @@ describe('elasticsearchSyntaxParser.js', () => {
     const resultA = elasticsearchSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = elasticsearchSyntaxParser.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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).toEqual(resultB.ruleId);
   };
 
@@ -181,8 +181,8 @@ describe('elasticsearchSyntaxParser.js', () => {
     const resultA = elasticsearchSyntaxParser.parseSyntax(beforeA, afterA);
     const resultB = elasticsearchSyntaxParser.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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);
   };
 

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Alter_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Alter.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js ALTER statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js ALTER statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Create_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Create.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js CREATE statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js CREATE statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Drop_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Drop.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js DROP statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js DROP statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Error_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Error.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js Error statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js Error statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Insert_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Insert.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js INSERT statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js INSERT statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Locations_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Locations.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 // prettier-ignore-start
@@ -23,8 +22,7 @@ describe('genericAutocompleteParser.js locations', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = true;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Select_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Select.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js SELECT statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js SELECT statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Set_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Set.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js SET statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js SET statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Update_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Update.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js UPDATE statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js UPDATE statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParser_Use_Spec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.Use.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js USE statements', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js USE statements', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/generic/spec/genericAutocompleteParserSpec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericAutocompleteParser.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import genericAutocompleteParser from '../genericAutocompleteParser';
 
 describe('genericAutocompleteParser.js', () => {
@@ -22,8 +21,7 @@ describe('genericAutocompleteParser.js', () => {
     genericAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 4 - 4
desktop/core/src/desktop/js/parse/sql/generic/spec/genericSyntaxParserSpec.js → desktop/core/src/desktop/js/parse/sql/generic/test/genericSyntaxParser.test.js

@@ -172,8 +172,8 @@ describe('genericSyntaxParser.js', () => {
     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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).toEqual(resultB.ruleId);
   };
 
@@ -181,8 +181,8 @@ describe('genericSyntaxParser.js', () => {
     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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);
   };
 

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Alter_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Alter.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
 
 describe('hiveAutocompleteParser.js ALTER statements', () => {
@@ -22,8 +21,7 @@ describe('hiveAutocompleteParser.js ALTER statements', () => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Analyze_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Analyze.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
 
 describe('hiveAutocompleteParser.js ANALYZE statements', () => {
@@ -22,8 +21,7 @@ describe('hiveAutocompleteParser.js ANALYZE statements', () => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Create_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Create.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
 
 describe('hiveAutocompleteParser.js CREATE statements', () => {
@@ -22,8 +21,7 @@ describe('hiveAutocompleteParser.js CREATE statements', () => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Describe_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Describe.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js DESCRIBE statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Drop_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Drop.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js DROP statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Error_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Error.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js Error statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Grant_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Grant.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js GRANT statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Import_Export_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.ImportExport.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js IMPORT and EXPORT statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Insert_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Insert.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js INSERT statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Load_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Load.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js LOAD statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Locations_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Locations.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
 
 describe('hiveAutocompleteParser.js locations', () => {
@@ -22,8 +21,7 @@ describe('hiveAutocompleteParser.js locations', () => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Select_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Select.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js SELECT statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Set_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Set.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js SET statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Show_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Show.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js SHOW statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Update_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Update.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js UPDATE statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParser_Use_Spec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.Use.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js USE statements', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveAutocompleteParserSpec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveAutocompleteParser.test.js

@@ -15,15 +15,12 @@
 // limitations under the License.
 
 import hiveAutocompleteParser from '../hiveAutocompleteParser';
-import SqlTestUtils from '../../../spec/sqlTestUtils';
-
 describe('hiveAutocompleteParser.js', () => {
   beforeAll(() => {
     hiveAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 4 - 4
desktop/core/src/desktop/js/parse/sql/hive/spec/hiveSyntaxParserSpec.js → desktop/core/src/desktop/js/parse/sql/hive/test/hiveSyntaxParser.test.js

@@ -225,8 +225,8 @@ describe('hiveSyntaxParser.js', () => {
     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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).toEqual(resultB.ruleId);
   };
 
@@ -234,8 +234,8 @@ describe('hiveSyntaxParser.js', () => {
     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).toBeTruthy();
+    expect(resultB).toBeTruthy();
     expect(resultA.ruleId).not.toEqual(resultB.ruleId);
   };
 

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Alter_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Alter.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js ALTER statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js ALTER statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Analyze_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Analyze.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js ANALYZE statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js ANALYZE statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Create_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Create.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js CREATE statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js CREATE statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Describe_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Describe.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js DESCRIBE statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js DESCRIBE statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Drop_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Drop.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js DROP statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js DROP statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Error_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Error.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js Error statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js Error statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Grant_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Grant.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js GRANT statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js GRANT statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Insert_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Insert.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js INSERT statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js INSERT statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

+ 1 - 3
desktop/core/src/desktop/js/parse/sql/impala/spec/impalaAutocompleteParser_Load_Spec.js → desktop/core/src/desktop/js/parse/sql/impala/test/impalaAutocompleteParser.Load.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import SqlTestUtils from 'parse/spec/sqlTestUtils';
 import impalaAutocompleteParser from '../impalaAutocompleteParser';
 
 describe('impalaAutocompleteParser.js LOAD statements', () => {
@@ -22,8 +21,7 @@ describe('impalaAutocompleteParser.js LOAD statements', () => {
     impalaAutocompleteParser.yy.parseError = function(msg) {
       throw Error(msg);
     };
-    jasmine.addMatchers(SqlTestUtils.testDefinitionMatcher);
-  });
+    });
 
   const assertAutoComplete = testDefinition => {
     const debug = false;

部分文件因文件數量過多而無法顯示