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

test: add promised tests for optionless dag.put #338

Merged
merged 3 commits into from
Aug 2, 2018
Merged

test: add promised tests for optionless dag.put #338

merged 3 commits into from
Aug 2, 2018

Conversation

negamaxi
Copy link
Contributor

No description provided.

negamaxi referenced this pull request in ipfs/js-ipfs Jul 29, 2018
* fix(core/components/dag): make options in `put` API optional

The [dag.put](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput) interface
takes an options object which is required, but should be optional with
decent defaults.

See dedicated test here: ipfs-inactive/interface-js-ipfs-core#316

This commit implements this behaviour.

**Before**:

```js
ipfs.dag.put(obj, options, (err, cid) => {...});
```

^ Prior to this commit, without passing `options`, this call resulted in an error.

**After**:

```js
ipfs.dag.put(obj, (err, cid) => {...});
```

^ This is now perfectly fine.

Fixes #1395

License: MIT
Signed-off-by: Pascal Precht <pascal.precht@gmail.com>

* chore: update interface-ipfs-core dependency

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
@alanshaw alanshaw merged commit 59aa1d5 into ipfs-inactive:master Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants