We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ef86f2 commit 9b85b16Copy full SHA for 9b85b16
test/stat-test.js
@@ -4,9 +4,19 @@
4
const chai = require('chai')
5
chai.use(require('dirty-chai'))
6
const expect = chai.expect
7
+const Block = require('ipfs-block')
8
+const CID = require('cids')
9
10
module.exports = (repo) => {
11
describe('stat', () => {
12
+ before(async () => {
13
+ const data = new Block(
14
+ Buffer.from('foo'),
15
+ new CID('bafyreighz6vdlkdsvp4nu3lxhsofnk2eqxn6o57ag3mfxkqa7c327djhra')
16
+ )
17
+ await repo.blocks.put(data)
18
+ })
19
+
20
it('get stats', async () => {
21
const stats = await repo.stat()
22
expect(stats).to.exist()
0 commit comments