Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: make stat test independent of other tests #207

Merged
merged 1 commit into from
Sep 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/stat-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@
const chai = require('chai')
chai.use(require('dirty-chai'))
const expect = chai.expect
const Block = require('ipfs-block')
const CID = require('cids')

module.exports = (repo) => {
describe('stat', () => {
before(async () => {
const data = new Block(
Buffer.from('foo'),
new CID('bafyreighz6vdlkdsvp4nu3lxhsofnk2eqxn6o57ag3mfxkqa7c327djhra')
)
await repo.blocks.put(data)
})

it('get stats', async () => {
const stats = await repo.stat()
expect(stats).to.exist()
Expand Down