Skip to content

Commit d02a5cd

Browse files
committed
Do not use toHaveLength for objects
Mocha supported `.to.have.length` for objects, but Jest only allows `toHaveLength` on objects which have a length property (such as arrays).
1 parent e895078 commit d02a5cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/ql-vscode/src/vscode-tests/cli-integration/legacy-query.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ describeWithCodeQL()("using the legacy query server", () => {
250250

251251
it(`should have correct results for query ${queryName}`, async () => {
252252
await parsedResults.done();
253-
expect(actualResultSets!).not.toHaveLength(0);
253+
expect(actualResultSets).not.toEqual({});
254254
expect(Object.keys(actualResultSets!).sort()).toEqual(
255255
Object.keys(queryTestCase.expectedResultSets).sort(),
256256
);

0 commit comments

Comments
 (0)