diff --git a/test/browser.spec.js b/test/browser.spec.js index 50e8dbccd..df11dd1ad 100644 --- a/test/browser.spec.js +++ b/test/browser.spec.js @@ -10,6 +10,11 @@ describe('browser', () => { expect(uint8ArrayToString(myFixture)).to.be.eql('Hello Fixture\n') }) + it('should load tar.gz fixures', () => { + const myFixture = loadFixture('test/fixtures/file.tar.gz') + expect(uint8ArrayToString(myFixture, 'base64')).to.equal('H4sICIlTHVIACw') + }) + it('non existing fixtures', () => { expect(() => loadFixture('/test/fixtures/asdalkdjaskldjatest.txt')) .to.throw() diff --git a/test/fixtures.js b/test/fixtures.js index b49632ffb..8c0c15672 100644 --- a/test/fixtures.js +++ b/test/fixtures.js @@ -15,4 +15,9 @@ describe('fixtures', () => { const myFixture = loadFixture(path.join('test', 'fixtures', 'test.txt')) expect(uint8ArrayToString(myFixture).trim()).to.be.eql('Hello Fixture') }) + + it('should load tar.gz fixures', () => { + const myFixture = loadFixture(path.join('test', 'fixtures', 'file.tar.gz')) + expect(uint8ArrayToString(myFixture, 'base64')).to.equal('H4sICIlTHVIACw') + }) }) diff --git a/test/fixtures/file.tar.gz b/test/fixtures/file.tar.gz new file mode 100644 index 000000000..2534dcbeb Binary files /dev/null and b/test/fixtures/file.tar.gz differ