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

docs: how to add an interface core test #1058

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,32 @@ Tests in the browser
$ npm run test:browser
```

### Writing a new core interface test

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:

1. Clone this project repo and the interface core tests repo:
* `git clone https://github.com/ipfs/js-ipfs-http-client.git`
* `git clone https://github.com/ipfs/interface-js-ipfs-core.git`
1. Install dependencies and globally [link](https://docs.npmjs.com/cli/link) the interface core tests:
* `cd interface-js-ipfs-core`
* `npm install`
* `npm link`
1. Write your test
1. Install dependencies for this project and link to the interface core tests
* `cd ../js-ipfs-http-client`
* `npm install`
* `npm link interface-ipfs-core`
1. Run the tests:
* `npm test`

Next:

1. Send a PR to `ipfs/interface-js-ipfs-core` (please also add to the documentation!)
1. This will be reviewed by a core contributor and they will perform the same steps as above
1. When merged, a new version of `interface-ipfs-core` will be released
1. Finally, a PR needs to be created or updated to `ipfs/js-ipfs-http-client` to use the new version

## Building browser version

```bash
Expand Down