From aa96ea083b0a1f7a919a1d57b0f300f1f3d2e5b5 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Fri, 13 Sep 2024 11:47:13 -0600 Subject: [PATCH] comments --- test/unit/explain.test.ts | 12 ++++++------ test/unit/utils.test.ts | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/test/unit/explain.test.ts b/test/unit/explain.test.ts index a707c6b8d2..8d71197a81 100644 --- a/test/unit/explain.test.ts +++ b/test/unit/explain.test.ts @@ -1,27 +1,27 @@ import { expect } from 'chai'; -import { it, test } from 'mocha'; +import { it } from 'mocha'; import { Explain, ExplainVerbosity } from '../mongodb'; describe('class Explain {}', function () { describe('static .fromOptions()', function () { - test('when no options are provided, it returns undefined', function () { + it('when no options are provided, it returns undefined', function () { expect(Explain.fromOptions()).to.be.undefined; }); - test('explain=true constructs an allPlansExecution explain', function () { + it('explain=true constructs an allPlansExecution explain', function () { const explain = Explain.fromOptions({ explain: true }); expect(explain).to.have.property('verbosity', ExplainVerbosity.allPlansExecution); expect(explain).to.have.property('maxTimeMS').to.be.undefined; }); - test('explain=false constructs an allPlansExecution explain', function () { + it('explain=false constructs an allPlansExecution explain', function () { const explain = Explain.fromOptions({ explain: false }); expect(explain).to.have.property('verbosity', ExplainVerbosity.queryPlanner); expect(explain).to.have.property('maxTimeMS').to.be.undefined; }); - test('explain= constructs an explain with verbosity set to the string', function () { + it('explain= constructs an explain with verbosity set to the string', function () { const explain = Explain.fromOptions({ explain: 'some random string' }); expect(explain).to.have.property('verbosity', 'some random string'); expect(explain).to.have.property('maxTimeMS').to.be.undefined; @@ -38,7 +38,7 @@ describe('class Explain {}', function () { expect(explain).to.have.property('maxTimeMS').to.be.undefined; }); - test('when a maxTimeMS is provided, it constructs an explain with the maxTImeMS value', function () { + it('when a maxTimeMS is provided, it constructs an explain with the maxTImeMS value', function () { const explain = Explain.fromOptions({ explain: { verbosity: 'some random string', diff --git a/test/unit/utils.test.ts b/test/unit/utils.test.ts index f4a00d44f7..2975f4b2e2 100644 --- a/test/unit/utils.test.ts +++ b/test/unit/utils.test.ts @@ -1,5 +1,4 @@ import { expect } from 'chai'; -import { test } from 'mocha'; import { BufferPool, @@ -1008,14 +1007,14 @@ describe('driver utils', function () { }); describe('decorateWithExplain()', function () { - test('when the command is a valid explain command, the command is returned unmodified', function () { + it('when the command is a valid explain command, the command is returned unmodified', function () { const command = Object.freeze({ explain: { hello: 'world' } }); const result = decorateWithExplain(command, Explain.fromOptions({ explain: true })); expect(result).to.deep.equal(command); }); - test('when the options have a maxTimeMS, it is attached to the explain command', function () { + it('when the options have a maxTimeMS, it is attached to the explain command', function () { const command = { ping: 1 }; const result = decorateWithExplain( command, @@ -1030,7 +1029,7 @@ describe('driver utils', function () { }); }); - test('when the options have do not have a maxTimeMS, it is not attached to the explain command', function () { + it('when the options have do not have a maxTimeMS, it is not attached to the explain command', function () { const command = { ping: 1 }; const result = decorateWithExplain( command,