Skip to content

Commit aa96ea0

Browse files
comments
1 parent dca8640 commit aa96ea0

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

test/unit/explain.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
import { expect } from 'chai';
2-
import { it, test } from 'mocha';
2+
import { it } from 'mocha';
33

44
import { Explain, ExplainVerbosity } from '../mongodb';
55

66
describe('class Explain {}', function () {
77
describe('static .fromOptions()', function () {
8-
test('when no options are provided, it returns undefined', function () {
8+
it('when no options are provided, it returns undefined', function () {
99
expect(Explain.fromOptions()).to.be.undefined;
1010
});
1111

12-
test('explain=true constructs an allPlansExecution explain', function () {
12+
it('explain=true constructs an allPlansExecution explain', function () {
1313
const explain = Explain.fromOptions({ explain: true });
1414
expect(explain).to.have.property('verbosity', ExplainVerbosity.allPlansExecution);
1515
expect(explain).to.have.property('maxTimeMS').to.be.undefined;
1616
});
1717

18-
test('explain=false constructs an allPlansExecution explain', function () {
18+
it('explain=false constructs an allPlansExecution explain', function () {
1919
const explain = Explain.fromOptions({ explain: false });
2020
expect(explain).to.have.property('verbosity', ExplainVerbosity.queryPlanner);
2121
expect(explain).to.have.property('maxTimeMS').to.be.undefined;
2222
});
2323

24-
test('explain=<type string> constructs an explain with verbosity set to the string', function () {
24+
it('explain=<type string> constructs an explain with verbosity set to the string', function () {
2525
const explain = Explain.fromOptions({ explain: 'some random string' });
2626
expect(explain).to.have.property('verbosity', 'some random string');
2727
expect(explain).to.have.property('maxTimeMS').to.be.undefined;
@@ -38,7 +38,7 @@ describe('class Explain {}', function () {
3838
expect(explain).to.have.property('maxTimeMS').to.be.undefined;
3939
});
4040

41-
test('when a maxTimeMS is provided, it constructs an explain with the maxTImeMS value', function () {
41+
it('when a maxTimeMS is provided, it constructs an explain with the maxTImeMS value', function () {
4242
const explain = Explain.fromOptions({
4343
explain: {
4444
verbosity: 'some random string',

test/unit/utils.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect } from 'chai';
2-
import { test } from 'mocha';
32

43
import {
54
BufferPool,
@@ -1008,14 +1007,14 @@ describe('driver utils', function () {
10081007
});
10091008

10101009
describe('decorateWithExplain()', function () {
1011-
test('when the command is a valid explain command, the command is returned unmodified', function () {
1010+
it('when the command is a valid explain command, the command is returned unmodified', function () {
10121011
const command = Object.freeze({ explain: { hello: 'world' } });
10131012
const result = decorateWithExplain(command, Explain.fromOptions({ explain: true }));
10141013

10151014
expect(result).to.deep.equal(command);
10161015
});
10171016

1018-
test('when the options have a maxTimeMS, it is attached to the explain command', function () {
1017+
it('when the options have a maxTimeMS, it is attached to the explain command', function () {
10191018
const command = { ping: 1 };
10201019
const result = decorateWithExplain(
10211020
command,
@@ -1030,7 +1029,7 @@ describe('driver utils', function () {
10301029
});
10311030
});
10321031

1033-
test('when the options have do not have a maxTimeMS, it is not attached to the explain command', function () {
1032+
it('when the options have do not have a maxTimeMS, it is not attached to the explain command', function () {
10341033
const command = { ping: 1 };
10351034
const result = decorateWithExplain(
10361035
command,

0 commit comments

Comments
 (0)