Even though SERVER-96944 introduces JSON output format to assert functions, however, many assert invocations add objects to the message, e.g.:
assert.eq(1, docs.length, "unexpected number of documents : " + tojson(docs));
This would serialize 'docs' into a string, which is undesirable. A better alternative:
assert.eq(1, docs.length, "unexpected number of documents", {docs});
- depends on
-
SERVER-96944 Convert assertion output in mongo (legacy) shell to JSON
-
- Closed
-