From 51359cc212a83f6bb7c7fb6f7f4f76c38f7357fa Mon Sep 17 00:00:00 2001 From: David Dias Date: Mon, 19 Dec 2016 03:23:55 +0000 Subject: [PATCH] docs: list npm scripts to add --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++------- package.json | 18 +++++++++++++----- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 37d51f21c2..0d37240c2f 100644 --- a/README.md +++ b/README.md @@ -223,22 +223,58 @@ Every IPFS instance also exposes the libp2p API at `ipfs.libp2p`. The formal int > npm install ``` -### Run Tests +### Run unit tests ```sh -> npm test +# run all the unit tsts +> npm test + +# run just IPFS tests in Node.js +> npm run test:unit:node:core # run just IPFS core tests -> npm run test:node:core +> npm run test:unit:node:core # run just IPFS HTTP-API tests -> npm run test:node:http +> npm run test:unit:node:http # run just IPFS CLI tests -> npm run test:node:cli +> npm run test:unit:node:cli + +# run just IPFS core tests in the Browser (Chrome) +> npm run test:unit:browser +``` + +### Run interop tests + +```sh +# run all the interop tsts +> npm test:interop + +# run just IPFS interop tests in Node.js using one go-ipfs daemon and one js-ipfs daemon +> npm run test:interop:node + +# run just IPFS interop testsin the Browser (Chrome) using one instance in the browser and one go-ipfs daemon +> npm run test:interop:browser +``` + +### Run benchmark tests + +```sh +# run all the interop tsts +> npm test:benchmark + +# run just IPFS benchmarks in Node.js +> npm run test:benchmark:node + +# run just IPFS benchmarks in Node.js for an IPFS instance +> npm run test:benchmark:node:core + +# run just IPFS benchmarks in Node.js for an IPFS daemon +> npm run test:benchmark:node:http -# run just IPFS Browser tests -> npm run test:browser +# run just IPFS benchmarks in the browser (Chrome) +> npm run test:benchmark:browser ``` ### Lint diff --git a/package.json b/package.json index 3a93388ba5..b8e668993c 100644 --- a/package.json +++ b/package.json @@ -21,11 +21,19 @@ "lint": "aegir-lint", "coverage": "gulp coverage", "test": "gulp test", - "test:node": "gulp test:node", - "test:node:core": "TEST=core npm run test:node", - "test:node:http": "TEST=http npm run test:node", - "test:node:cli": "TEST=cli npm run test:node", - "test:browser": "gulp test:browser", + "test:unit:node": "gulp test:node", + "test:unit:node:core": "TEST=core npm run test:node", + "test:unit:node:http": "TEST=http npm run test:node", + "test:unit:node:cli": "TEST=cli npm run test:node", + "test:unit:browser": "gulp test:browser", + "test:interop": "", + "test:interop:node": "", + "test:interop:browser": "", + "test:benchmark": "", + "test:benchmark:node": "", + "test:benchmark:node:core": "", + "test:benchmark:node:http": "", + "test:benchmark:browser": "", "build": "gulp build", "release": "gulp release", "release-minor": "gulp release --type minor",