| 1 |
{ |
| 2 |
"data": [ |
| 3 |
{ |
| 4 |
"_id": 1, |
| 5 |
"x": 11 |
| 6 |
}, |
| 7 |
{ |
| 8 |
"_id": 2, |
| 9 |
"x": 22 |
| 10 |
}, |
| 11 |
{ |
| 12 |
"_id": 3, |
| 13 |
"x": 33 |
| 14 |
} |
| 15 |
], |
| 16 |
"tests": [ |
| 17 |
{ |
| 18 |
"description": "FindOneAndDelete when many documents match", |
| 19 |
"operation": { |
| 20 |
"name": "findOneAndDelete", |
| 21 |
"arguments": { |
| 22 |
"filter": { |
| 23 |
"_id": { |
| 24 |
"$gt": 1 |
| 25 |
} |
| 26 |
}, |
| 27 |
"projection": { |
| 28 |
"x": 1, |
| 29 |
"_id": 0 |
| 30 |
}, |
| 31 |
"sort": { |
| 32 |
"x": 1 |
| 33 |
} |
| 34 |
} |
| 35 |
}, |
| 36 |
"outcome": { |
| 37 |
"result": { |
| 38 |
"x": 22 |
| 39 |
}, |
| 40 |
"collection": { |
| 41 |
"data": [ |
| 42 |
{ |
| 43 |
"_id": 1, |
| 44 |
"x": 11 |
| 45 |
}, |
| 46 |
{ |
| 47 |
"_id": 3, |
| 48 |
"x": 33 |
| 49 |
} |
| 50 |
] |
| 51 |
} |
| 52 |
} |
| 53 |
}, |
| 54 |
{ |
| 55 |
"description": "FindOneAndDelete when one document matches", |
| 56 |
"operation": { |
| 57 |
"name": "findOneAndDelete", |
| 58 |
"arguments": { |
| 59 |
"filter": { |
| 60 |
"_id": 2 |
| 61 |
}, |
| 62 |
"projection": { |
| 63 |
"x": 1, |
| 64 |
"_id": 0 |
| 65 |
}, |
| 66 |
"sort": { |
| 67 |
"x": 1 |
| 68 |
} |
| 69 |
} |
| 70 |
}, |
| 71 |
"outcome": { |
| 72 |
"result": { |
| 73 |
"x": 22 |
| 74 |
}, |
| 75 |
"collection": { |
| 76 |
"data": [ |
| 77 |
{ |
| 78 |
"_id": 1, |
| 79 |
"x": 11 |
| 80 |
}, |
| 81 |
{ |
| 82 |
"_id": 3, |
| 83 |
"x": 33 |
| 84 |
} |
| 85 |
] |
| 86 |
} |
| 87 |
} |
| 88 |
}, |
| 89 |
{ |
| 90 |
"description": "FindOneAndDelete when no documents match", |
| 91 |
"operation": { |
| 92 |
"name": "findOneAndDelete", |
| 93 |
"arguments": { |
| 94 |
"filter": { |
| 95 |
"_id": 4 |
| 96 |
}, |
| 97 |
"projection": { |
| 98 |
"x": 1, |
| 99 |
"_id": 0 |
| 100 |
}, |
| 101 |
"sort": { |
| 102 |
"x": 1 |
| 103 |
} |
| 104 |
} |
| 105 |
}, |
| 106 |
"outcome": { |
| 107 |
"result": null, |
| 108 |
"collection": { |
| 109 |
"data": [ |
| 110 |
{ |
| 111 |
"_id": 1, |
| 112 |
"x": 11 |
| 113 |
}, |
| 114 |
{ |
| 115 |
"_id": 2, |
| 116 |
"x": 22 |
| 117 |
}, |
| 118 |
{ |
| 119 |
"_id": 3, |
| 120 |
"x": 33 |
| 121 |
} |
| 122 |
] |
| 123 |
} |
| 124 |
} |
| 125 |
} |
| 126 |
] |
| 127 |
} |