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

Commit

Permalink
fix: name and key tests (#661)
Browse files Browse the repository at this point in the history
* Update key.spec.js

* fix: name tests

* Update name.spec.js
  • Loading branch information
hacdias authored and daviddias committed Jan 5, 2018
1 parent faad510 commit 5ab1d02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/key.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('.key', function () {
ipfs.key.list((err, res) => {
expect(err).to.not.exist()
expect(res).to.exist()
expect(res.Keys.length).to.equal(3)
expect(res.length).to.equal(3)
done()
})
})
Expand All @@ -77,7 +77,7 @@ describe('.key', function () {
it('4 keys to show up + self', () => {
return ipfs.key.list().then((res) => {
expect(res).to.exist()
expect(res.Keys.length).to.equal(5)
expect(res.length).to.equal(5)
})
})
})
Expand Down
12 changes: 4 additions & 8 deletions test/name.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ describe('.name', function () {
})

it('.name.resolve', (done) => {
ipfs.name.resolve(name.Name, (err, res) => {
ipfs.name.resolve(name.name, (err, res) => {
expect(err).to.not.exist()
expect(res).to.exist()
expect(res).to.be.eql({
Path: name.Value
})
expect(res).to.be.eql(name.value)
done()
})
})
Expand All @@ -99,12 +97,10 @@ describe('.name', function () {
})

it('.name.resolve', () => {
return ipfs.name.resolve(name.Name)
return ipfs.name.resolve(name.name)
.then((res) => {
expect(res).to.exist()
expect(res).to.be.eql({
Path: name.Value
})
expect(res).to.be.eql(name.value)
})
})
})
Expand Down

0 comments on commit 5ab1d02

Please sign in to comment.