Browse Source

fix and update tests

develop
Conduitry 3 years ago
parent
commit
fabd46b903
  1. 2
      test/test.browser.js
  2. 5
      test/test.everywhere.js
  3. 2
      test/test.node.js

2
test/test.browser.js

@ -2,7 +2,7 @@ const test = require(`zora`)
const doNotZip = require(`../`)
test(`Creates a Blob in the browser`, t => {
const outputBlob = doNotZip([
const outputBlob = doNotZip.toAuto([
{ path: `path/to/file1.txt`, data: `Hello` },
{ path: `another/file2.txt`, data: `World` },
])

5
test/test.everywhere.js

@ -3,7 +3,7 @@ const doNotZip = require(`../`)
const { loadJzip, jzipToEntries, entriesToObject } = require(`./helper.js`)
test(`Creates a zip file that jszip can read`, async t => {
const outputBlob = doNotZip([
const outputBlob = doNotZip.toAuto([
{ path: `path/to/file1.txt`, data: `Hello` },
{ path: `another/file2.txt`, data: `World` },
])
@ -15,6 +15,5 @@ test(`Creates a zip file that jszip can read`, async t => {
const jzipMap = entriesToObject(entries)
expectedPaths.forEach(expectedPath => expectedPath in jzipMap)
expectedPaths.forEach(expectedPath => t.ok(expectedPath in jzipMap))
})

2
test/test.node.js

@ -2,7 +2,7 @@ const test = require(`zora`)
const doNotZip = require(`../`)
test(`Creates a Buffer in node`, t => {
const outputBlob = doNotZip([
const outputBlob = doNotZip.toAuto([
{ path: `path/to/file1.txt`, data: `Hello` },
{ path: `another/file2.txt`, data: `World` },
])

Loading…
Cancel
Save