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

Commit 5ab1d02

Browse files
hacdiasdaviddias
authored andcommitted
fix: name and key tests (#661)
* Update key.spec.js * fix: name tests * Update name.spec.js
1 parent faad510 commit 5ab1d02

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

test/key.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('.key', function () {
5151
ipfs.key.list((err, res) => {
5252
expect(err).to.not.exist()
5353
expect(res).to.exist()
54-
expect(res.Keys.length).to.equal(3)
54+
expect(res.length).to.equal(3)
5555
done()
5656
})
5757
})
@@ -77,7 +77,7 @@ describe('.key', function () {
7777
it('4 keys to show up + self', () => {
7878
return ipfs.key.list().then((res) => {
7979
expect(res).to.exist()
80-
expect(res.Keys.length).to.equal(5)
80+
expect(res.length).to.equal(5)
8181
})
8282
})
8383
})

test/name.spec.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@ describe('.name', function () {
7676
})
7777

7878
it('.name.resolve', (done) => {
79-
ipfs.name.resolve(name.Name, (err, res) => {
79+
ipfs.name.resolve(name.name, (err, res) => {
8080
expect(err).to.not.exist()
8181
expect(res).to.exist()
82-
expect(res).to.be.eql({
83-
Path: name.Value
84-
})
82+
expect(res).to.be.eql(name.value)
8583
done()
8684
})
8785
})
@@ -99,12 +97,10 @@ describe('.name', function () {
9997
})
10098

10199
it('.name.resolve', () => {
102-
return ipfs.name.resolve(name.Name)
100+
return ipfs.name.resolve(name.name)
103101
.then((res) => {
104102
expect(res).to.exist()
105-
expect(res).to.be.eql({
106-
Path: name.Value
107-
})
103+
expect(res).to.be.eql(name.value)
108104
})
109105
})
110106
})

0 commit comments

Comments
 (0)