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

Commit

Permalink
refactor(module+tests): Enable running the tests
Browse files Browse the repository at this point in the history
individually and reduce complexity inside ipfs-api
  • Loading branch information
daviddias committed Aug 14, 2016
1 parent 73078ea commit 108414b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ $ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://exam

### API

> `WIP`
`js-ipfs-api` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor - expect it to be complete in the next few weeks (August 2016). You can use it today to consult the methods available.
> `js-ipfs-api` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor - expect it to be complete in the next few weeks (August 2016). You can use it today to consult the methods available.
### Utility functions

Expand Down Expand Up @@ -140,6 +138,7 @@ This is very similar to `ipfs.files.add({path:'', content: stream})`. It is like

```JavaScript
```
>>>>>> refactor(module+tests): Enable running the tests
### Callbacks and promises

Expand All @@ -166,8 +165,6 @@ We run tests by executing `npm test` in a terminal window. This will run both No



>>>>>>> kick off ipfs-api next generation
## Contribute

The js-ipfs-api is a work in progress. As such, there's a few things you can do right now to help out:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "ipfs-api",
"version": "6.0.3",
"description": "A client library for the IPFS API",
"main": "src/index.js",
"description": "A client library for the IPFS HTTP API. Follows interface-ipfs-core spec",
"main": "lib/index.js",
"jsnext:main": "src/index.js",
"scripts": {
"test": "gulp test",
Expand Down
13 changes: 8 additions & 5 deletions test/interface-ipfs-core/config.spec.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
/* eslint-env mocha */
/* eslint max-nested-callbacks: ["error", 8] */
/* globals apiClients */
'use strict'

const test = require('interface-ipfs-core')
const FactoryClient = require('../factory/factory-client')

let fc

const common = {
setup: function (cb) {
cb(null, apiClients.a)
setup: function (callback) {
fc = new FactoryClient()
callback(null, fc)
},
teardown: function (cb) {
cb()
teardown: function (callback) {
fc.dismantle(callback)
}
}

Expand Down
1 change: 1 addition & 0 deletions test/tmp-disposable-nodes-addrs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"c":"/ip4/127.0.0.1/tcp/56459","a":"/ip4/127.0.0.1/tcp/56466","b":"/ip4/127.0.0.1/tcp/56479"}

0 comments on commit 108414b

Please sign in to comment.