diff --git a/test/test.js b/test/test.js index 6de8a9cc4..145380358 100644 --- a/test/test.js +++ b/test/test.js @@ -28,7 +28,9 @@ push = Array.prototype.push, slice = Array.prototype.slice, system = root.system, - toString = Object.prototype.toString, + toString = Object.prototype.toString; + + var JSON = root.JSON, Worker = document && root.Worker; /** The file path of the Lo-Dash file to test */ @@ -9656,6 +9658,16 @@ } }); + test('should stringify the wrapped value when passed to `JSON.stringify`', 1, function() { + if (!isNpm && JSON) { + var wrapped = _([1, 2, 3]); + strictEqual(JSON.stringify(wrapped), '[1,2,3]'); + } + else { + skipTest(); + } + }); + test('should be aliased', 2, function() { if (!isNpm) { var expected = _.prototype.valueOf;