-
-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken tests { level: 0 } #107
Comments
Also, test helper probably should align OS codes (for gzip) before compare nodejs/node#10980 (comment). That does not make sense now, but may be useful for others. |
UPD: it seems that zlib 1.2.11 really changed deflate const pako = require('pako');
const zlib = require('zlib');
const fs = require('fs');
const assert = require('assert');
const join = require('path').join;
const len100k = new Uint8Array(fs.readFileSync(join(__dirname, 'fixtures/lorem_en_100k.txt')));
describe('deflate level 0 checks', function () {
it('pako deflate -> pako inflate', function () {
assert.deepEqual(
pako.inflate(pako.deflate(len100k, { level: 0 })),
len100k
);
});
it('zlib deflate -> zlib inflate', function () {
assert.deepEqual(
zlib.inflateSync(zlib.deflateSync(Buffer.from(len100k), { level: 0 })),
len100k
);
});
it('zlib deflate -> pako inflate', function () {
assert.deepEqual(
pako.inflate(zlib.deflateSync(Buffer.from(len100k), { level: 0 })),
len100k
);
});
it('zlib deflate vs pako deflate', function () {
assert.deepEqual(
zlib.deflateSync(Buffer.from(len100k), { level: 0 }),
pako.deflate(len100k, { level: 0 })
);
});
}); |
@rbuels just remove those lines and you will see. |
Ups... sorry, wrong comment. Yes, that's still an issue. But it's better so solve it as part of resync with upstream. That's a separate task |
nodejs/node#10980
After node upgraded zlib 1.2.8 -> 1.2.11, 2 tests become broken.
The text was updated successfully, but these errors were encountered: