File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export default (options: SyntaxTestOptions) => {
125125 assert . strictEqual ( data [ 2 ] . name , 'Alice' , 'third item' )
126126 } ,
127127 '.find + $sort + string' : async ( ) => {
128- const data = await service . find ( {
128+ let data = await service . find ( {
129129 query : {
130130 $sort : { name : '1' } ,
131131 } ,
@@ -135,6 +135,17 @@ export default (options: SyntaxTestOptions) => {
135135 assert . strictEqual ( data [ 0 ] . name , 'Alice' , 'first item' )
136136 assert . strictEqual ( data [ 1 ] . name , 'Bob' , 'second item' )
137137 assert . strictEqual ( data [ 2 ] . name , 'Doug' , 'third item' )
138+
139+ data = await service . find ( {
140+ query : {
141+ $sort : { name : '-1' } ,
142+ } ,
143+ } )
144+
145+ assert . strictEqual ( data . length , 3 , 'correct data.length' )
146+ assert . strictEqual ( data [ 0 ] . name , 'Doug' , 'first item' )
147+ assert . strictEqual ( data [ 1 ] . name , 'Bob' , 'second item' )
148+ assert . strictEqual ( data [ 2 ] . name , 'Alice' , 'third item' )
138149 } ,
139150 '.find + $limit' : async ( ) => {
140151 const data = await service . find ( {
You can’t perform that action at this time.
0 commit comments