Skip to content

Commit

Permalink
update command shouldnt include multi option when false
Browse files Browse the repository at this point in the history
  • Loading branch information
emadum committed Feb 12, 2021
1 parent 1f8f371 commit a448317
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/operations/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export function makeUpdateStatement(
op.upsert = options.upsert;
}

if (typeof options.multi === 'boolean') {
if (options.multi) {
op.multi = options.multi;
}

Expand Down
5 changes: 4 additions & 1 deletion test/functional/unified-spec-runner/match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ export function resultCheck(

if (depth > 1) {
expect(actual, `Expected actual to exist at ${path.join('')}`).to.exist;
expect(Object.keys(actual)).to.include.members(Object.keys(expected));
expect(
Object.keys(actual),
`[${Object.keys(actual)}] length !== [${Object.keys(expected)}]`
).to.have.lengthOf(Object.keys(expected).length);
}

for (const [key, value] of expectedEntries) {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/unified-spec-runner/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export async function runUnifiedTest(
...(test.runOnRequirements ?? [])
];

let doesNotMeetRunOnRequirement = allRequirements.length > 0;
let doesNotMeetRunOnRequirement = false;

for (const requirement of allRequirements) {
const met = await topologySatisfies(ctx.configuration, requirement, utilClient);
Expand Down

0 comments on commit a448317

Please sign in to comment.