diff --git a/test/inflate.js b/test/inflate.js index 108e712..464eae7 100644 --- a/test/inflate.js +++ b/test/inflate.js @@ -169,15 +169,15 @@ describe('Inflate with dictionary', function () { it('should throw on the wrong dictionary', function () { // var zCompressed = helpers.deflateSync('world', { dictionary: new Buffer('hello') }); - var zCompressed = new Buffer([ 120, 187, 6, 44, 2, 21, 43, 207, 47, 202, 73, 1, 0, 6, 166, 2, 41 ]); + var zCompressed = new Uint8Array([ 120, 187, 6, 44, 2, 21, 43, 207, 47, 202, 73, 1, 0, 6, 166, 2, 41 ]); assert.throws(function () { - pako.inflate(zCompressed, { dictionary: new Buffer('world') }); + pako.inflate(zCompressed, { dictionary: 'world' }); }, /data error/); }); it('trivial dictionary', function () { - var dict = new Buffer('abcdefghijklmnoprstuvwxyz'); + var dict = 'abcdefghijklmnoprstuvwxyz'; testInflate(samples, { dictionary: dict }, { dictionary: dict }); }); @@ -187,7 +187,7 @@ describe('Inflate with dictionary', function () { }); it('should throw if directory is not supplied to raw inflate', function () { - var dict = new Buffer('abcdefghijklmnoprstuvwxyz'); + var dict = 'abcdefghijklmnoprstuvwxyz'; assert.throws(function () { testInflate(samples, { raw: true }, { raw: true, dictionary: dict }); });