From 18b7c2e0ae43701d57c0451d4088afc07ab6214e Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Wed, 6 Mar 2019 18:40:32 +0530 Subject: [PATCH 1/5] docs(contributing): commands to install jest globally Add commands to install jest globally for running individual tests ISSUES CLOSED: #775 --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (98%) diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 98% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 6cea68c5c44..57782a4b7b9 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -49,6 +49,8 @@ npm link webpack-cli - `BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js` * To test a single CLI (other type of) test case: + - If jest is not installed globally + - `npm i -g jest` - `jest path/to/my-test.js` * To test linting: @@ -72,6 +74,8 @@ yarn link webpack-cli - `BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js` * To test a single CLI (other type of) test case: + - If jest is not installed globally + - `yarn global add jest` - `jest path/to/my-test.js` * To test linting: From 126cf5594c027c56f509b6bbfadf83c249f12240 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Wed, 6 Mar 2019 20:12:48 +0530 Subject: [PATCH 2/5] docs(contributing): add yarn before running jest Add yarn before jest to grab the local binary of jest from node_modules to run individual tests ISSUES CLOSED: #775 --- .github/CONTRIBUTING.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 57782a4b7b9..3a816a517a3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -49,9 +49,7 @@ npm link webpack-cli - `BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js` * To test a single CLI (other type of) test case: - - If jest is not installed globally - - `npm i -g jest` - - `jest path/to/my-test.js` + - `yarn jest path/to/my-test.js` * To test linting: - `npm run lint && npm run tslint` @@ -74,9 +72,7 @@ yarn link webpack-cli - `BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js` * To test a single CLI (other type of) test case: - - If jest is not installed globally - - `yarn global add jest` - - `jest path/to/my-test.js` + - `yarn jest path/to/my-test.js` * To test linting: - `yarn lint && yarn tslint` From bc0297a2b9c6932eeb6fdbee0215a1fea6a603d0 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Wed, 6 Mar 2019 20:27:58 +0530 Subject: [PATCH 3/5] docs(contributing): update instructions to run individual tests Add docs to either install jest or use the locally installed binaries from node_modules ISSUES CLOSED: #775 --- .github/CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3a816a517a3..55eab892741 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -49,7 +49,9 @@ npm link webpack-cli - `BIN_TEST_CASES_GREP=/myCase jest test/BinTestCases.test.js` * To test a single CLI (other type of) test case: - - `yarn jest path/to/my-test.js` + - `npx jest path/to/my-test.js` + - You can also install jest globally and run tests without npx. + - `npm i -g jest` * To test linting: - `npm run lint && npm run tslint` From b7cca584bb794671751445036001c8c95d5415cf Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Thu, 7 Mar 2019 00:44:54 +0530 Subject: [PATCH 4/5] docs(contributing): update instructions to run individual tests Updated instructions to run individual tests in contributing.md ISSUES CLOSED: #775 --- .github/CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 55eab892741..2a58337df9d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -52,6 +52,8 @@ npm link webpack-cli - `npx jest path/to/my-test.js` - You can also install jest globally and run tests without npx. - `npm i -g jest` + - If you have jest installed globally. + - `jest path/to/my-test.js` * To test linting: - `npm run lint && npm run tslint` From 48d65fd629293b2025db6b16796fda4b9101229d Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sat, 9 Mar 2019 02:25:15 +0530 Subject: [PATCH 5/5] docs(contributing): : at the end of paragraphs Added : at the end of paragraphs ISSUES CLOSED: #775 --- .github/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2a58337df9d..1acfe503f89 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -50,9 +50,9 @@ npm link webpack-cli * To test a single CLI (other type of) test case: - `npx jest path/to/my-test.js` - - You can also install jest globally and run tests without npx. + - You can also install jest globally and run tests without npx: - `npm i -g jest` - - If you have jest installed globally. + - If you have jest installed globally: - `jest path/to/my-test.js` * To test linting: