feat: add toMatchUnorderedArrary matcher and apply it (#271)

* feat: add toMatchUnorderedArrary matcher replace tokenSuggestion test

* fix: revert benchmark and replace matcher of trinosql

---------

Co-authored-by: jialan <jialan@dtstack.com>
This commit is contained in:
JackWang032
2024-03-01 16:48:53 +08:00
committed by GitHub
parent 195878da9b
commit a05f099aa1
11 changed files with 136 additions and 48 deletions

View File

@ -19,7 +19,7 @@ describe('Impala SQL Token Suggestion', () => {
pos
)?.keywords;
expect(suggestion).toEqual(['TABLE', 'VIEW', 'DATABASE']);
expect(suggestion).toMatchUnorderedArrary(['TABLE', 'VIEW', 'DATABASE']);
});
test('After CREATE', () => {
@ -32,7 +32,7 @@ describe('Impala SQL Token Suggestion', () => {
pos
)?.keywords;
expect(suggestion).toEqual([
expect(suggestion).toMatchUnorderedArrary([
'TABLE',
'EXTERNAL',
'VIEW',
@ -54,7 +54,7 @@ describe('Impala SQL Token Suggestion', () => {
pos
)?.keywords;
expect(suggestion).toEqual([
expect(suggestion).toMatchUnorderedArrary([
'DATABASE',
'SCHEMA',
'TABLE',
@ -77,7 +77,7 @@ describe('Impala SQL Token Suggestion', () => {
pos
)?.keywords;
expect(suggestion).toEqual(['INTO', 'OVERWRITE']);
expect(suggestion).toMatchUnorderedArrary(['INTO', 'OVERWRITE']);
});
test('After SHOW', () => {
@ -90,7 +90,7 @@ describe('Impala SQL Token Suggestion', () => {
pos
)?.keywords;
expect(suggestion).toEqual([
expect(suggestion).toMatchUnorderedArrary([
'DATABASES',
'SCHEMAS',
'TABLES',