File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,18 @@ describe('calculateSize()', () => {
25
25
) . to . throw ( BSONVersionError , / U n s u p p o r t e d B S O N v e r s i o n / i) ;
26
26
} ) ;
27
27
28
- it ( 'returns 8 bytes (+7 meta bytes) size for a bigint value' , function ( ) {
29
- const doc = { a : BigInt ( 1 ) } ;
30
- expect ( BSON . calculateObjectSize ( doc ) ) . to . equal ( 16 ) ;
31
- expect ( BSON . calculateObjectSize ( doc ) ) . to . equal ( BSON . serialize ( doc ) . byteLength ) ;
28
+ describe ( 'bigint' , function ( ) {
29
+ beforeEach ( function ( ) {
30
+ if ( BSON . __noBigInt__ ) {
31
+ this . currentTest ?. skip ( ) ;
32
+ }
33
+ } ) ;
34
+
35
+ it ( 'returns 8 bytes (+7 meta bytes) size for a bigint value' , function ( ) {
36
+ const doc = { a : BigInt ( 1 ) } ;
37
+ expect ( BSON . calculateObjectSize ( doc ) ) . to . equal ( 16 ) ;
38
+ expect ( BSON . calculateObjectSize ( doc ) ) . to . equal ( BSON . serialize ( doc ) . byteLength ) ;
39
+ } ) ;
32
40
} ) ;
33
41
34
42
it ( 'returns 0 bytes (+5 meta bytes) for a symbol value' , function ( ) {
You can’t perform that action at this time.
0 commit comments