@@ -40,13 +40,13 @@ describe('sanitizeFilter', function() {
4040 } ) ;
4141
4242 it ( 'handles $not' , function ( ) {
43- let obj = { username : 'val' , pwd : { $not : { $ne : 'my secret' } } } ;
43+ const obj = { username : 'val' , pwd : { $not : { $ne : 'my secret' } } } ;
4444 sanitizeFilter ( obj ) ;
4545 assert . deepEqual ( obj , { username : 'val' , pwd : { $eq : { $not : { $ne : 'my secret' } } } } ) ;
4646 } ) ;
4747
4848 it ( 'handles $jsonSchema' , function ( ) {
49- let obj = {
49+ const obj = {
5050 $jsonSchema : {
5151 bsonType : 'object' ,
5252 required : [ 'pwd' ] ,
@@ -69,22 +69,22 @@ describe('sanitizeFilter', function() {
6969 } ) ;
7070 } ) ;
7171
72- it ( 'handles $where' , function ( ) {
73- let obj = { $where : 'true' } ;
72+ it ( 'handles $where' , function ( ) {
73+ const obj = { $where : 'true' } ;
7474 assert . throws (
7575 ( ) => sanitizeFilter ( obj ) ,
7676 / \$ w h e r e i s n o t a l l o w e d w i t h s a n i t i z e F i l t e r /
7777 ) ;
7878
79- const whereFunc = function ( ) { return true } ;
79+ const whereFunc = function ( ) { return true ; } ;
8080 obj . $where = trusted ( whereFunc ) ;
8181 sanitizeFilter ( obj ) ;
8282 assert . deepEqual ( obj , { $where : whereFunc } ) ;
8383 } ) ;
8484
85- it ( 'handles $expr' , function ( ) {
85+ it ( 'handles $expr' , function ( ) {
8686 const func = function ( ) { return true ; } ;
87- let obj = {
87+ const obj = {
8888 $expr : {
8989 $function : { body : func }
9090 }
@@ -99,8 +99,8 @@ describe('sanitizeFilter', function() {
9999 assert . deepEqual ( obj , { $expr : { $function : { body : func } } } ) ;
100100 } ) ;
101101
102- it ( 'handles $text' , function ( ) {
103- let obj = {
102+ it ( 'handles $text' , function ( ) {
103+ const obj = {
104104 $text : {
105105 $search : 'test'
106106 }
0 commit comments