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: 29a302e9fcfd
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: 7ab13cd4aaaa
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 26, 2015

  1. Copy the full SHA
    f94c628 View commit details
  2. Copy the full SHA
    7ab13cd View commit details
Showing with 32 additions and 28 deletions.
  1. +5 −3 karma.conf.js
  2. +27 −25 test/tests.js
8 changes: 5 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module.exports = function (config) {
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.')
process.exit(1)
if (!process.env.DEBUG) {
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.')
process.exit(1)
}
}

// Browsers to run on Sauce Labs
52 changes: 27 additions & 25 deletions test/tests.js
Original file line number Diff line number Diff line change
@@ -482,36 +482,38 @@ describe('IPFS Node.js API wrapper tests', function () {
it('.name.resolve')
})

describe('.refs', function () {
var folder = 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q'
if (isNode) {
describe('.refs', function () {
var folder = 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q'

it('refs', function (done) {
this.timeout(10000)
apiClients['a'].refs(folder, {'format': '<src> <dst> <linkname>'}, function (err, objs) {
if (err) {
throw err
}
it('refs', function (done) {
this.timeout(10000)
apiClients['a'].refs(folder, {'format': '<src> <dst> <linkname>'}, function (err, objs) {
if (err) {
throw err
}

var result = [{
Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmaeuuKLHzirbVoTjb3659fyyV381amjaGrU2pecHEWPrN add.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmTQhTtDWeaaP9pttDd1CuoVTLQm1w51ABfjgmGUbCUF6i cat.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmTYFLz5vsdMpq4XXw1a1pSxujJc9Z5V3Aw1Qg64d849Zy files\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmTjXxUemcuMAZ2KNN3iJGWHwrkMsW8SWEwkYVSBi1nFD9 ipfs-add.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmXYUXDFNNh1wgwtX5QDG7MsuhAAcE9NzDYnz8SjnhvQrK ls.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmUmDmH4hZgN5THnVP1VjJ1YWh5kWuhLGUihch8nFiD9iy version.js\n',
Err: '' } ]

assert.deepEqual(objs, result)
var result = [{
Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmaeuuKLHzirbVoTjb3659fyyV381amjaGrU2pecHEWPrN add.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmTQhTtDWeaaP9pttDd1CuoVTLQm1w51ABfjgmGUbCUF6i cat.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmTYFLz5vsdMpq4XXw1a1pSxujJc9Z5V3Aw1Qg64d849Zy files\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmTjXxUemcuMAZ2KNN3iJGWHwrkMsW8SWEwkYVSBi1nFD9 ipfs-add.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmXYUXDFNNh1wgwtX5QDG7MsuhAAcE9NzDYnz8SjnhvQrK ls.js\n',
Err: '' },
{ Ref: 'QmaMTzaGBmdLrispnPRTESta4yDQdK4uKSVcQez2No4h6q QmUmDmH4hZgN5THnVP1VjJ1YWh5kWuhLGUihch8nFiD9iy version.js\n',
Err: '' } ]

assert.deepEqual(objs, result)

done()
done()
})
})
})
})
}

describe('.dht', function () {
it('returns an error when getting a non-existent key from the DHT',