diff --git a/README.md b/README.md index 10ee353..6254707 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ import { Estuary } from 'estuary-upload'; const estuary = new Estuary(''); -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!` ); ``` @@ -29,20 +29,24 @@ $ npm run add-dir ## Run Test -1. Set API KEY +### Unit Test ```bash -$ export ESTUARY_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= ``` -3. Run test +2. Run test -```bash -$ npm test +``` +$ npm run integration ```