From ce94a405cea036be8d957310dd16b82210ac1a9c Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 22 Feb 2022 18:29:55 +0100 Subject: [PATCH] chore(cli-repl): avoid deprecated count in --shell test `.count()` is deprecated and should not be used, and makes this test currently fail in `apiStrict` mode because it uses the `count` command since the recent driver version bump to 4.4.0. --- packages/cli-repl/src/cli-repl.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli-repl/src/cli-repl.spec.ts b/packages/cli-repl/src/cli-repl.spec.ts index f97790ac42..a475c2abaf 100644 --- a/packages/cli-repl/src/cli-repl.spec.ts +++ b/packages/cli-repl/src/cli-repl.spec.ts @@ -1067,7 +1067,7 @@ describe('CliRepl', () => { expect(output).to.match(/Inserted: ObjectId\("[a-z0-9]{24}"\)/); expect(exitCode).to.equal(null); - input.write('print("doc count", insertTestCollection.count())\n'); + input.write('print("doc count", insertTestCollection.countDocuments())\n'); await waitEval(cliRepl.bus); expect(output).to.include('doc count 1');