fix: Lint errors.

This commit is contained in:
Hayden Young 2024-01-12 13:27:50 +00:00
parent 8ab276026a
commit 47f9889c77

View File

@ -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')
})
})