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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipfs-inactive/js-ipfs-http-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 24707c6b8567
Choose a base ref
...
head repository: ipfs-inactive/js-ipfs-http-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9fd8ced1a406
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 23, 2015

  1. Copy the full SHA
    65d8c32 View commit details
  2. 1
    Copy the full SHA
    9fd8ced View commit details
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/request-api.js
  2. +4 −4 test/api/add.spec.js
2 changes: 1 addition & 1 deletion src/request-api.js
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ function onRes (buffer, cb) {

Wreck.read(res, {json: true}, (err, payload) => {
if (err) {
cb(err)
return cb(err)
}
if (payload) {
error.code = payload.Code
8 changes: 4 additions & 4 deletions test/api/add.spec.js
Original file line number Diff line number Diff line change
@@ -52,8 +52,8 @@ describe('.add', function () {
apiClients['a'].add(buf, (err, res) => {
if (err) throw err

// assert.equal(res.length, 1)
const added = res[0] !== null ? res[0] : res
assert.equal(res.length, 1)
const added = res[0]
assert.equal(added.Hash, 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP')
done()
})
@@ -68,8 +68,8 @@ describe('.add', function () {
apiClients['a'].add(testfileBig, (err, res) => {
if (err) throw err

// assert.equal(res.length, 1)
const added = res[0] !== null ? res[0] : res
assert.equal(res.length, 1)
const added = res[0]
assert.equal(added.Hash, 'Qme79tX2bViL26vNjPsF3DP1R9rMKMvnPYJiKTTKPrXJjq')
done()
})