Skip to content

Commit

Permalink
improve bgzip tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Sep 1, 2018
1 parent 35850ff commit b94820e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/gzip_specials.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,17 @@ describe('Gzip special cases', function () {
});

it('Read bgzipped file 1', function () {
var data = fs.readFileSync(path.join(__dirname, 'fixtures/bgzip-1.txt.gz'));
var result = pako.inflate(data);
var inputData = fs.readFileSync(path.join(__dirname, 'fixtures/bgzip-1.txt.gz'));
var expectedData = fs.readFileSync(path.join(__dirname, 'fixtures/bgzip-1.txt'));
var result = pako.inflate(inputData);

assert.equal(result.length, 65569);
assert.deepEqual(result, expectedData, 'must get the exact right inflated result');
});

it('Read bgzipped file 2', function () {
var data = fs.readFileSync(path.join(__dirname, 'fixtures/bgzip-2.txt.gz'));
var result = pako.inflate(data);

assert.equal(result.length, 1922918);
var all = pako.inflate(data);
assert.equal(all.length, 1922918, 'decompressed full data');
});
});

0 comments on commit b94820e

Please sign in to comment.