mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-04 10:50:59 +01:00
Replaced Buffer() in inflate tests with dictionary.
This commit is contained in:
parent
919ad7f228
commit
cfc92c2fb8
1 changed files with 4 additions and 4 deletions
|
@ -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 });
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue