Skip to content

Commit

Permalink
fix: first part of test
Browse files Browse the repository at this point in the history
  • Loading branch information
coratgerl committed Oct 11, 2023
1 parent 7899daf commit cafe3ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/ParseQuery.hint.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ describe_only_db('mongo')('Parse.Query hint', () => {
});
console.log(JSON.stringify(result[0], null, 2));
let { queryPlanner } = result[0].stages[0].$cursor;
expect(queryPlanner.winningPlan.queryPlan.inputStage.stage).toBe('COLLSCAN');
expect(queryPlanner.winningPlan.stage).toBe('COLLSCAN');

result = await collection.aggregate([{ $group: { _id: '$foo' } }], {
hint: '_id_',
explain: true,
});
console.log(JSON.stringify(result[0], null, 2));
queryPlanner = result[0].stages[0].$cursor.queryPlanner;
expect(queryPlanner.winningPlan.queryPlan.inputStage.stage).toBe('FETCH');
expect(queryPlanner.winningPlan.stage).toBe('FETCH');
expect(queryPlanner.winningPlan.queryPlan.inputStage.inputStage.indexName).toBe('_id_');
});

Expand Down Expand Up @@ -181,7 +181,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
explain: true,
});
let { queryPlanner } = result[0].stages[0].$cursor;
expect(queryPlanner.winningPlan.queryPlan.inputStage.stage).toBe('COLLSCAN');
expect(queryPlanner.winningPlan.stage).toBe('COLLSCAN');

result = await collection.aggregate([{ $group: { _id: '$foo' } }], {
hint: { _id: 1 },
Expand Down Expand Up @@ -329,7 +329,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
});
let response = await request(options);
let { queryPlanner } = response.data.results[0];
expect(queryPlanner.winningPlan.queryPlan.inputStage.stage).toBe('COLLSCAN');
expect(queryPlanner.winningPlan.stage).toBe('COLLSCAN');

options = Object.assign({}, masterKeyOptions, {
url: Parse.serverURL + '/aggregate/TestObject',
Expand Down

0 comments on commit cafe3ea

Please sign in to comment.