From 2eb4168a870125dc28fcbbb22576ccd5a45ac807 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Mon, 21 Jul 2014 23:04:31 -0700 Subject: [PATCH] fix tests for ie6+7: fix use of JSON object --- test/basic.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/basic.js b/test/basic.js index a24986b..2f79d19 100644 --- a/test/basic.js +++ b/test/basic.js @@ -162,6 +162,11 @@ test('buffer toJSON()', function (t) { }) test('new buffer from buffer.toJSON() output', function (t) { + if (typeof JSON === 'undefined') { + // ie6, ie7 lack support + t.end() + return + } var buf = new B('test') var json = JSON.stringify(buf) var obj = JSON.parse(json) -- 2.34.1