1
1
import { expect } from 'chai' ;
2
- import { it , test } from 'mocha' ;
2
+ import { it } from 'mocha' ;
3
3
4
4
import { Explain , ExplainVerbosity } from '../mongodb' ;
5
5
6
6
describe ( 'class Explain {}' , function ( ) {
7
7
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 ( ) {
9
9
expect ( Explain . fromOptions ( ) ) . to . be . undefined ;
10
10
} ) ;
11
11
12
- test ( 'explain=true constructs an allPlansExecution explain' , function ( ) {
12
+ it ( 'explain=true constructs an allPlansExecution explain' , function ( ) {
13
13
const explain = Explain . fromOptions ( { explain : true } ) ;
14
14
expect ( explain ) . to . have . property ( 'verbosity' , ExplainVerbosity . allPlansExecution ) ;
15
15
expect ( explain ) . to . have . property ( 'maxTimeMS' ) . to . be . undefined ;
16
16
} ) ;
17
17
18
- test ( 'explain=false constructs an allPlansExecution explain' , function ( ) {
18
+ it ( 'explain=false constructs an allPlansExecution explain' , function ( ) {
19
19
const explain = Explain . fromOptions ( { explain : false } ) ;
20
20
expect ( explain ) . to . have . property ( 'verbosity' , ExplainVerbosity . queryPlanner ) ;
21
21
expect ( explain ) . to . have . property ( 'maxTimeMS' ) . to . be . undefined ;
22
22
} ) ;
23
23
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 ( ) {
25
25
const explain = Explain . fromOptions ( { explain : 'some random string' } ) ;
26
26
expect ( explain ) . to . have . property ( 'verbosity' , 'some random string' ) ;
27
27
expect ( explain ) . to . have . property ( 'maxTimeMS' ) . to . be . undefined ;
@@ -38,7 +38,7 @@ describe('class Explain {}', function () {
38
38
expect ( explain ) . to . have . property ( 'maxTimeMS' ) . to . be . undefined ;
39
39
} ) ;
40
40
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 ( ) {
42
42
const explain = Explain . fromOptions ( {
43
43
explain : {
44
44
verbosity : 'some random string' ,
0 commit comments