|
| 1 | +# TOC |
| 2 | + - [IPFS Node.js API wrapper tests](#ipfs-nodejs-api-wrapper-tests) |
| 3 | + - [.send](#ipfs-nodejs-api-wrapper-tests-send) |
| 4 | + - [.add](#ipfs-nodejs-api-wrapper-tests-add) |
| 5 | + - [.cat](#ipfs-nodejs-api-wrapper-tests-cat) |
| 6 | + - [.ls](#ipfs-nodejs-api-wrapper-tests-ls) |
| 7 | + - [.config](#ipfs-nodejs-api-wrapper-tests-config) |
| 8 | + - [.update (currently disabled, wait for IPFS 0.4.0 release](#ipfs-nodejs-api-wrapper-tests-update-currently-disabled-wait-for-ipfs-040-release) |
| 9 | + - [.version](#ipfs-nodejs-api-wrapper-tests-version) |
| 10 | + - [.commands](#ipfs-nodejs-api-wrapper-tests-commands) |
| 11 | + - [.mount](#ipfs-nodejs-api-wrapper-tests-mount) |
| 12 | + - [.diag](#ipfs-nodejs-api-wrapper-tests-diag) |
| 13 | + - [.block](#ipfs-nodejs-api-wrapper-tests-block) |
| 14 | + - [.object](#ipfs-nodejs-api-wrapper-tests-object) |
| 15 | + - [.swarm](#ipfs-nodejs-api-wrapper-tests-swarm) |
| 16 | + - [.ping](#ipfs-nodejs-api-wrapper-tests-ping) |
| 17 | + - [.id](#ipfs-nodejs-api-wrapper-tests-id) |
| 18 | + - [.pin](#ipfs-nodejs-api-wrapper-tests-pin) |
| 19 | + - [.log](#ipfs-nodejs-api-wrapper-tests-log) |
| 20 | + - [.name](#ipfs-nodejs-api-wrapper-tests-name) |
| 21 | + - [.refs](#ipfs-nodejs-api-wrapper-tests-refs) |
| 22 | + - [.dht](#ipfs-nodejs-api-wrapper-tests-dht) |
| 23 | +<a name=""></a> |
| 24 | + |
| 25 | +<a name="ipfs-nodejs-api-wrapper-tests"></a> |
| 26 | +# IPFS Node.js API wrapper tests |
| 27 | +has the api object. |
| 28 | + |
| 29 | +```js |
| 30 | +assert(apiClients['a']) |
| 31 | +assert(apiClients['a'].id) |
| 32 | +``` |
| 33 | + |
| 34 | +<a name="ipfs-nodejs-api-wrapper-tests-send"></a> |
| 35 | +## .send |
| 36 | +<a name="ipfs-nodejs-api-wrapper-tests-add"></a> |
| 37 | +## .add |
| 38 | +<a name="ipfs-nodejs-api-wrapper-tests-cat"></a> |
| 39 | +## .cat |
| 40 | +<a name="ipfs-nodejs-api-wrapper-tests-ls"></a> |
| 41 | +## .ls |
| 42 | +<a name="ipfs-nodejs-api-wrapper-tests-config"></a> |
| 43 | +## .config |
| 44 | +<a name="ipfs-nodejs-api-wrapper-tests-update-currently-disabled-wait-for-ipfs-040-release"></a> |
| 45 | +## .update (currently disabled, wait for IPFS 0.4.0 release |
| 46 | +<a name="ipfs-nodejs-api-wrapper-tests-version"></a> |
| 47 | +## .version |
| 48 | +<a name="ipfs-nodejs-api-wrapper-tests-commands"></a> |
| 49 | +## .commands |
| 50 | +<a name="ipfs-nodejs-api-wrapper-tests-diag"></a> |
| 51 | +## .diag |
| 52 | +<a name="ipfs-nodejs-api-wrapper-tests-block"></a> |
| 53 | +## .block |
| 54 | +<a name="ipfs-nodejs-api-wrapper-tests-object"></a> |
| 55 | +## .object |
| 56 | +<a name="ipfs-nodejs-api-wrapper-tests-swarm"></a> |
| 57 | +## .swarm |
| 58 | +.swarm.connect. |
| 59 | + |
| 60 | +```js |
| 61 | +// Done in the 'before' segment |
| 62 | +done() |
| 63 | +``` |
| 64 | + |
| 65 | +<a name="ipfs-nodejs-api-wrapper-tests-ping"></a> |
| 66 | +## .ping |
| 67 | +<a name="ipfs-nodejs-api-wrapper-tests-id"></a> |
| 68 | +## .id |
| 69 | +<a name="ipfs-nodejs-api-wrapper-tests-pin"></a> |
| 70 | +## .pin |
| 71 | +<a name="ipfs-nodejs-api-wrapper-tests-log"></a> |
| 72 | +## .log |
| 73 | +<a name="ipfs-nodejs-api-wrapper-tests-name"></a> |
| 74 | +## .name |
| 75 | +<a name="ipfs-nodejs-api-wrapper-tests-refs"></a> |
| 76 | +## .refs |
| 77 | +<a name="ipfs-nodejs-api-wrapper-tests-dht"></a> |
| 78 | +## .dht |
| 79 | +returns an error when getting a non-existent key from the DHT. |
| 80 | + |
| 81 | +```js |
| 82 | +this.timeout(20000) |
| 83 | +apiClients['a'].dht.get('non-existent', {timeout: '100ms'}, function (err, value) { |
| 84 | + assert(err) |
| 85 | + done() |
| 86 | +}) |
| 87 | +``` |
| 88 | + |
0 commit comments