Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
docs(README.md): update description for running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shc261392 committed Sep 29, 2022
1 parent 1f40133 commit d7a4d0d
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import { Estuary } from 'estuary-upload';

const estuary = new Estuary('<api-key>');
const resp = await estuary.add('my-file.jpg');
const cid = await estuary.addFromPath('my-file.jpg');
console.log(
`The file is uploaded to Estuary with CID ${resp.data.cid} preserved!`
`The file is uploaded to Estuary with CID ${cid} preserved!`
);
```

Expand All @@ -29,20 +29,24 @@ $ npm run add-dir <file-dirpath>

## Run Test

1. Set API KEY
### Unit Test

```bash
$ export ESTUARY_API_KEY=<api-key>
$ npm run unit
```

2. Download test image
### Integration Test

The integration test will fetch an image (size ~20MB) from public IPFS gateway and upload it to Estuary.

1. Set API key

```bash
$ ./get-test-image.sh
```
$ export ESTUARY_API_KEY=<api-key>
```

3. Run test
2. Run test

```bash
$ npm test
```
$ npm run integration
```

0 comments on commit d7a4d0d

Please sign in to comment.