From 1bf53478a54bed5c3c316694e1af85ada24d8582 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Wed, 18 Nov 2015 13:04:43 -0800 Subject: [PATCH] test: add `toJSON` tests [@jderuere] --- test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index 5320d4f..8d9247c 100644 --- a/test.js +++ b/test.js @@ -22,12 +22,12 @@ describe('has-binarydata', function(){ }); it('should work with an object that does not contain binary', function() { - var ob = {a: 'a', b: [], c: 1234}; + var ob = {a: 'a', b: [], c: 1234, toJSON: '{\"a\": \"a\"}'}; assert(!hasBinary(ob)); }); it('should work with an object that contains a buffer', function() { - var ob = {a: 'a', b: new Buffer('abc'), c: 1234}; + var ob = {a: 'a', b: new Buffer('abc'), c: 1234, toJSON: '{\"a\": \"a\"}'}; assert(hasBinary(ob)); });