diff --git a/src/commands.zig b/src/commands.zig index 0828e8d..4b5d26f 100644 --- a/src/commands.zig +++ b/src/commands.zig @@ -5919,9 +5919,10 @@ test "arrayFilters reach the update, and are refused before the scan" { try testing.expectEqual(@as(i32, 9), values[1].int32); // A filter no path uses is refused even when the query matches nothing at - // all, which is what makes the check belong before the scan rather than - // inside the per-document loop. Mutation check: move `update.validate` - // below `scan_matching` and this answers ok. + // all, which is what makes the check belong beside the scan rather than + // inside `apply`. Mutation check: delete the standalone `update.validate` + // call and this answers ok -- `apply` runs once per matched document, and + // there are none. const unused = [_]bson.Value{.{ .doc = &.{ .{ .key = "q", .value = .{ .doc = &.{.{ .key = "nomatch", .value = .{ .int32 = 1 } }} } }, .{ .key = "u", .value = .{ .doc = &.{