File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/query-mongoose/__tests__/query Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ describe('WhereBuilder', (): void => {
54
54
{
55
55
$and : [
56
56
{
57
- $and : [ { numberType : { $eq : 1 } } , { stringType : { $regex : / f o o .* / } } , { boolType : { $eq : true } } ]
57
+ $and : [ { numberType : { $eq : 1 } } , { stringType : { $regex : / ^ f o o .* $ / } } , { boolType : { $eq : true } } ]
58
58
}
59
59
]
60
60
}
@@ -88,8 +88,8 @@ describe('WhereBuilder', (): void => {
88
88
} ,
89
89
{
90
90
$and : [
91
- { $and : [ { $and : [ { numberType : { $gt : 10 } } , { stringType : { $regex : / f o o .* / } } ] } ] } ,
92
- { $and : [ { $and : [ { numberType : { $lt : 20 } } , { stringType : { $regex : / .* b a r / } } ] } ] }
91
+ { $and : [ { $and : [ { numberType : { $gt : 10 } } , { stringType : { $regex : / ^ f o o .* $ / } } ] } ] } ,
92
+ { $and : [ { $and : [ { numberType : { $lt : 20 } } , { stringType : { $regex : / ^ .* b a r $ / } } ] } ] }
93
93
]
94
94
}
95
95
)
@@ -147,14 +147,14 @@ describe('WhereBuilder', (): void => {
147
147
{
148
148
$and : [
149
149
{
150
- $and : [ { numberType : { $gt : 10 } } , { stringType : { $regex : / f o o .* / } } ]
150
+ $and : [ { numberType : { $gt : 10 } } , { stringType : { $regex : / ^ f o o .* $ / } } ]
151
151
}
152
152
]
153
153
} ,
154
154
{
155
155
$and : [
156
156
{
157
- $and : [ { numberType : { $lt : 20 } } , { stringType : { $regex : / .* b a r / } } ]
157
+ $and : [ { numberType : { $lt : 20 } } , { stringType : { $regex : / ^ .* b a r $ / } } ]
158
158
}
159
159
]
160
160
}
You can’t perform that action at this time.
0 commit comments