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

fix: name and key tests #661

Merged
merged 3 commits into from
Jan 5, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
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
8 changes: 2 additions & 6 deletions test/name.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ describe('.name', function () {
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 @@ -102,9 +100,7 @@ describe('.name', function () {
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hacdias should it be name.value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing 😄

})
})
})
Expand Down