mongo/jstests/aggregation/expressions/concat.js
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00

12 lines
377 B
JavaScript

/*
* Test that $concating empty string works correctly. May be extended in the future to include
* more thorough testing of $concat.
*/
const coll = db.concat;
coll.drop();
assert.commandWorked(coll.insert({}));
assert.eq(coll.findOne({}, {_id: false, "a": {$concat: [{$toLower: "$b"}]}}), {a: ""});
assert.eq(coll.findOne({}, {_id: false, "a": {$concat: []}}), {a: ""});