diff --git a/lib/sinon.js b/lib/sinon.js index 8f75137ad..95679cee5 100644 --- a/lib/sinon.js +++ b/lib/sinon.js @@ -363,7 +363,10 @@ var sinon = (function (formatio) { } if (formatio) { - var formatter = formatio.configure({ quoteStrings: false }); + var formatter = formatio.configure({ + quoteStrings: false, + limitChildrenCount: 250 + }); sinon.format = function () { return formatter.ascii.apply(formatter, arguments); }; diff --git a/package.json b/package.json index d209e4fc5..e964bb4d7 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "prepublish": "./build" }, "dependencies": { - "formatio": "~1.0", + "formatio": "~1.1.1", "util": ">=0.10.3 <1" }, "devDependencies": { diff --git a/test/sinon_test.js b/test/sinon_test.js index 1cf600ae6..eee67952d 100644 --- a/test/sinon_test.js +++ b/test/sinon_test.js @@ -563,6 +563,13 @@ buster.testCase("sinon", { assert.equals(sinon.format({ id: 42 }), "{ id: 42 }"); }, + "// should configure formatio to use maximum 250 entries" : function(){ + // not sure how we can verify this integration with the current setup + // where sinon.js calls formatio as part of it's loading + // extracting sinon.format into a separate module would make this a lot + // easier + }, + "formats strings without quotes": function () { assert.equals(sinon.format("Hey"), "Hey"); }