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

Commit 42626d8

Browse files
author
Alan Shaw
authored
docs: how to add an interface core test (#1058)
1 parent 758d451 commit 42626d8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

CONTRIBUTING.md

+26
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,32 @@ Tests in the browser
2626
$ npm run test:browser
2727
```
2828

29+
### Writing a new core interface test
30+
31+
The core interface tests are kept in a separate repo, because they are used by multiple other projects. To add a core interface test, follow this guide:
32+
33+
1. Clone this project repo and the interface core tests repo:
34+
* `git clone https://github.com/ipfs/js-ipfs-http-client.git`
35+
* `git clone https://github.com/ipfs/interface-js-ipfs-core.git`
36+
1. Install dependencies and globally [link](https://docs.npmjs.com/cli/link) the interface core tests:
37+
* `cd interface-js-ipfs-core`
38+
* `npm install`
39+
* `npm link`
40+
1. Write your test
41+
1. Install dependencies for this project and link to the interface core tests
42+
* `cd ../js-ipfs-http-client`
43+
* `npm install`
44+
* `npm link interface-ipfs-core`
45+
1. Run the tests:
46+
* `npm test`
47+
48+
Next:
49+
50+
1. Send a PR to `ipfs/interface-js-ipfs-core` (please also add to the documentation!)
51+
1. This will be reviewed by a core contributor and they will perform the same steps as above
52+
1. When merged, a new version of `interface-ipfs-core` will be released
53+
1. Finally, a PR needs to be created or updated to `ipfs/js-ipfs-http-client` to use the new version
54+
2955
## Building browser version
3056

3157
```bash

0 commit comments

Comments
 (0)