From: Feross Aboukhadijeh Date: Tue, 22 Jul 2014 06:04:31 +0000 (-0700) Subject: fix tests for ie6+7: fix use of JSON object X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=2eb4168a870125dc28fcbbb22576ccd5a45ac807;p=buffer.git fix tests for ie6+7: fix use of JSON object --- 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)