diff --git a/test/storage/ipfs-block.test.js b/test/storage/ipfs-block.test.js index 7579149..7d405e1 100644 --- a/test/storage/ipfs-block.test.js +++ b/test/storage/ipfs-block.test.js @@ -9,7 +9,7 @@ import IPFSBlockStorage from '../../src/storage/ipfs-block.js' describe('IPFSBlockStorage', function () { const codec = dagCbor const hasher = sha256 - + let ipfs, storage beforeEach(async () => { @@ -17,15 +17,15 @@ describe('IPFSBlockStorage', function () { const pin = true const timeout = 1000 - storage = await IPFSBlockStorage({ ipfs, pin, timeout }) + storage = await IPFSBlockStorage({ ipfs, pin, timeout }) }) - + afterEach(async () => { await ipfs.stop() }) - it('gets a block', async () => { - const expected = 'hello world' + it('gets a block', async () => { + const expected = 'hello world' const block = await Block.encode({ value: expected, codec, hasher }) const cid = block.cid.toString(base58btc) @@ -36,19 +36,19 @@ describe('IPFSBlockStorage', function () { }) it('throws an error if a block does not exist', async () => { - const value = 'i don\'t exist' + const value = 'i don\'t exist' const block = await Block.encode({ value, codec, hasher }) const cid = block.cid.toString(base58btc) - + let err = null - + try { await storage.get(cid) } catch (error) { err = error } - notStrictEqual(err, null) + notStrictEqual(err, null) strictEqual(err.message, 'All promises were rejected') }) })