Skip to content

Commit a56a3b3

Browse files
authored
Merge pull request #317 from janfh/fix/token_tests
Assertions in tokens.test.ts
2 parents 083ba23 + 6e20127 commit a56a3b3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/language/sql/tests/tokens.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ test('Comment token test', () => {
3737
].join(`\n`));
3838

3939
expect(tokens.length).toBe(12);
40-
expect(tokens.some(t => t.value === `--hello: world!!!: coolness`));
40+
expect(tokens.some(t => t.value === `--hello: world!!!: coolness`)).toBeTruthy();
4141
});
4242

4343
test('New line (\\n) and comments test', () => {
@@ -49,7 +49,7 @@ test('New line (\\n) and comments test', () => {
4949
].join(`\n`));
5050

5151
expect(tokens.length).toBe(5);
52-
expect (tokens[3].type === `newline`);
52+
expect(tokens[2].type).toBe(`newline`);
5353
});
5454

5555
test('New line (\\r\\n) and comments test', () => {
@@ -61,7 +61,7 @@ test('New line (\\r\\n) and comments test', () => {
6161
].join(`\r\n`));
6262

6363
expect(tokens.length).toBe(5);
64-
expect (tokens[3].type === `newline`);
64+
expect (tokens[2].type).toBe(`newline`);
6565
});
6666

6767
test(`Delimited names`, () => {
@@ -72,13 +72,13 @@ test(`Delimited names`, () => {
7272

7373
expect(tokens.length).toBe(22);
7474

75-
expect (tokens[2].type === `sqlName`);
76-
expect (tokens[2].value === `"TestDelimiters"`);
75+
expect (tokens[2].type).toBe(`sqlName`);
76+
expect (tokens[2].value).toBe(`"TestDelimiters"`);
7777

78-
expect (tokens[3].type === `dot`);
78+
expect (tokens[3].type).toBe(`dot`);
7979

80-
expect (tokens[4].type === `sqlName`);
81-
expect (tokens[4].value === `"Delimited Table"`);
80+
expect (tokens[4].type).toBe(`sqlName`);
81+
expect (tokens[4].value).toBe(`"Delimited Table"`);
8282
});
8383

8484
test(`Block comments`, () => {

0 commit comments

Comments
 (0)