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

Commit 6b1aa73

Browse files
author
Alan Shaw
committed
fix: tests
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 6e75bc6 commit 6b1aa73

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/add-from-fs/index.browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
'use strict'
22

3-
module.exports = () => { throw new Error('unavailable in the browser') }
3+
module.exports = () => () => { throw new Error('unavailable in the browser') }

src/files-regular/index.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ module.exports = (arg) => {
66
const send = moduleConfig(arg)
77

88
return {
9-
add: require('../files-regular/add')(send),
10-
addReadableStream: require('../files-regular/add-readable-stream')(send),
11-
addPullStream: require('../files-regular/add-pull-stream')(send),
12-
addFromFs: require('../files-regular/add-from-fs')(send),
13-
addFromURL: require('../files-regular/add-from-url')(send),
14-
addFromStream: require('../files-regular/add')(send),
15-
_addAsyncIterator: require('../files-regular/add-async-iterator')(send),
169
cat: require('../files-regular/cat')(send),
1710
catReadableStream: require('../files-regular/cat-readable-stream')(send),
1811
catPullStream: require('../files-regular/cat-pull-stream')(send),

test/files-mfs.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('.files (the MFS API part)', function () {
9696

9797
it('.add with cid-version=1 and raw-leaves=false', (done) => {
9898
const expectedCid = 'bafybeifogzovjqrcxvgt7g36y7g63hvwvoakledwk4b2fr2dl4wzawpnny'
99-
const options = { 'cid-version': 1, 'raw-leaves': false }
99+
const options = { cidVersion: 1, rawLeaves: false }
100100

101101
ipfs.add(testfile, options, (err, res) => {
102102
expect(err).to.not.exist()
@@ -174,7 +174,7 @@ describe('.files (the MFS API part)', function () {
174174
path: content + '.txt',
175175
content: Buffer.from(content)
176176
}
177-
const options = { hash: name, 'raw-leaves': false }
177+
const options = { hashAlg: name, rawLeaves: false }
178178

179179
ipfs.add([file], options, (err, res) => {
180180
if (err) return done(err)
@@ -264,7 +264,7 @@ describe('.files (the MFS API part)', function () {
264264
path: content + '.txt',
265265
content: Buffer.from(content)
266266
}
267-
const options = { hash: name, 'raw-leaves': false }
267+
const options = { hashAlg: name, rawLeaves: false }
268268

269269
ipfs.add([file], options, (err, res) => {
270270
expect(err).to.not.exist()

0 commit comments

Comments
 (0)