File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/query-parser/src Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,12 @@ e s`,
402
402
context ( 'when providing a long' , function ( ) {
403
403
it ( 'correctly converts to NumberLong' , function ( ) {
404
404
const stringified = stringify ( { test : bson . Long . fromNumber ( 5 ) } ) ;
405
- assert . equal ( stringified , '{test: NumberLong(5)}' ) ;
405
+ assert . equal ( stringified , "{test: NumberLong('5')}" ) ;
406
+
407
+ assert . equal (
408
+ stringify ( { test : new bson . Long ( '123456789123456789' ) } ) ,
409
+ "{test: NumberLong('123456789123456789')}"
410
+ ) ;
406
411
} ) ;
407
412
} ) ;
408
413
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ const BSON_TO_JS_STRING = {
89
89
return `Timestamp({ t: ${ v . high } , i: ${ v . low } })` ;
90
90
} ,
91
91
Long : function ( v : Long ) {
92
- return `NumberLong(${ v . toString ( ) } )` ;
92
+ return `NumberLong(' ${ v . toString ( ) } ' )` ;
93
93
} ,
94
94
Decimal128 : function ( v : Decimal128 ) {
95
95
return `NumberDecimal('${ v . toString ( ) } ')` ;
You can’t perform that action at this time.
0 commit comments