Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit c249f14

Browse files
committed
add feature block stat + test + readme reference to tests as examples
1 parent bca2039 commit c249f14

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/api/block.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const argCommand = require('../cmd-helpers').argCommand
55
module.exports = send => {
66
return {
77
get: argCommand(send, 'block/get'),
8+
stat: argCommand(send, 'block/stat'),
89
put (file, cb) {
910
if (Array.isArray(file)) {
1011
return cb(null, new Error('block.put() only accepts 1 file'))

test/api/block.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,13 @@ describe('.block', () => {
2525
})
2626
})
2727
})
28+
29+
it('block.stat', done => {
30+
apiClients['a'].block.stat(blorbKey, (err, res) => {
31+
expect(err).to.not.exist
32+
expect(res).to.have.property('Key')
33+
expect(res).to.have.property('Size')
34+
done()
35+
})
36+
})
2837
})

0 commit comments

Comments
 (0)