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

@ -17,7 +17,7 @@ describe('Postgres SQL Token Suggestion', () => {
commentOtherLine(tokenSql, pos.lineNumber),
pos
)?.keywords;
expect(suggestion).toEqual([
expect(suggestion).toMatchUnorderedArrary([
'TYPE',
'TEXT',
'STATISTICS',
@ -66,7 +66,7 @@ describe('Postgres SQL Token Suggestion', () => {
commentOtherLine(tokenSql, pos.lineNumber),
pos
)?.keywords;
expect(suggestion).toEqual([
expect(suggestion).toMatchUnorderedArrary([
'RECURSIVE',
'VIEW',
'TEMPORARY',
@ -126,7 +126,7 @@ describe('Postgres SQL Token Suggestion', () => {
commentOtherLine(tokenSql, pos.lineNumber),
pos
)?.keywords;
expect(suggestion).toEqual(['FROM']);
expect(suggestion).toMatchUnorderedArrary(['FROM']);
});
test('After DROP', () => {
@ -138,7 +138,7 @@ describe('Postgres SQL Token Suggestion', () => {
commentOtherLine(tokenSql, pos.lineNumber),
pos
)?.keywords;
expect(suggestion).toEqual([
expect(suggestion).toMatchUnorderedArrary([
'OPERATOR',
'ROUTINE',
'PROCEDURE',
@ -188,6 +188,6 @@ describe('Postgres SQL Token Suggestion', () => {
commentOtherLine(tokenSql, pos.lineNumber),
pos
)?.keywords;
expect(suggestion).toEqual(['INTO']);
expect(suggestion).toMatchUnorderedArrary(['INTO']);
});
});