diff --git a/test/cmp.js b/test/cmp.js index 77a05c2..ab24bee 100644 --- a/test/cmp.js +++ b/test/cmp.js @@ -95,7 +95,7 @@ test('dates', function (t) { }); test('buffers', { skip: typeof Buffer !== 'function' }, function (t) { - var safeBuffer = Buffer.from || Buffer; + var safeBuffer = Buffer.from && Buffer.from.length > 1 ? Buffer.from : Buffer; t.deepEqualTest( safeBuffer('xyz'), safeBuffer('xyz'),