Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit f68d018

Browse files
committed
fix: tests using files
1 parent 4085089 commit f68d018

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
"go-ipfs-dep": "~0.4.18",
5252
"hat": "0.0.3",
5353
"ipfs": "~0.33.0",
54-
"ipfs-api": "^26.1.2",
5554
"ipfs-unixfs": "~0.1.16",
55+
"ipfs-http-client": "^27.0.0",
5656
"ipfsd-ctl": "~0.40.0",
5757
"left-pad": "^1.3.0",
5858
"libp2p-websocket-star-rendezvous": "~0.2.4",

test/files.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function checkNodeTypes (daemon, file) {
2626
expect(node.links.length).to.equal(2)
2727

2828
return Promise.all(
29-
node.links.map(link => daemon.api.object.get(link.toJSON().multihash).then(child => {
29+
node.links.map(link => daemon.api.object.get(link.toJSON().cid).then(child => {
3030
const childMeta = UnixFs.unmarshal(child.data)
3131

3232
expect(childMeta.type).to.equal('raw')
@@ -196,7 +196,7 @@ describe('files', function () {
196196

197197
describe('has the same hashes for', () => {
198198
const testHashesAreEqual = (daemon, data, options) => {
199-
return daemon.api.files.add(data, options)
199+
return daemon.api.add(data, options)
200200
.then(files => files[0].hash)
201201
}
202202

test/utils/circuit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ exports.createGoNode = (addrs, callback) => {
9898
const data = crypto.randomBytes(128)
9999
exports.send = (nodeA, nodeB, callback) => {
100100
waterfall([
101-
(cb) => nodeA.files.add(data, cb),
102-
(res, cb) => nodeB.files.cat(res[0].hash, cb),
101+
(cb) => nodeA.add(data, cb),
102+
(res, cb) => nodeB.cat(res[0].hash, cb),
103103
(buffer, cb) => {
104104
expect(buffer).to.deep.equal(data)
105105
cb()

0 commit comments

Comments
 (0)