From 58c48b1b211e733b63bff116949a06b75dd49e6c Mon Sep 17 00:00:00 2001 From: Kristjan Esperanto <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 25 Dec 2021 21:58:30 +0100 Subject: [PATCH 1/2] End-to-End Testing + Format --- .github/CONTRIBUTING.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c93daa37..3d2d1339 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,13 +4,15 @@ Thanks for contributing to MagicMirror²! We hold our code to standard, and these standards are documented below. +## Linters + If you wish to run our linters, use `npm run lint` without any arguments. ### JavaScript: Run ESLint We use [ESLint](https://eslint.org) on our JavaScript files. -Our ESLint configuration is in our .eslintrc.json and .eslintignore files. +Our ESLint configuration is in our `.eslintrc.json` and `.eslintignore` files. To run ESLint, use `npm run lint:js`. @@ -20,7 +22,13 @@ We use [StyleLint](https://stylelint.io) to lint our CSS. Our configuration is i To run StyleLint, use `npm run lint:css`. -### Submitting Issues +## End-to-End Testing + +We use [Jest](https://jestjs.io) for JavaScript Testing. + +To run the test, use `npx jest tests/e2e/env_spec.js`. + +## Submitting Issues Please only submit reproducible issues. From 855860c00ca9af0877c4b9f81e878da6a4cbc71c Mon Sep 17 00:00:00 2001 From: Kristjan Esperanto <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sun, 26 Dec 2021 06:54:46 +0100 Subject: [PATCH 2/2] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3d2d1339..3563f85e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -22,11 +22,13 @@ We use [StyleLint](https://stylelint.io) to lint our CSS. Our configuration is i To run StyleLint, use `npm run lint:css`. -## End-to-End Testing +## Testing -We use [Jest](https://jestjs.io) for JavaScript Testing. +We use [Jest](https://jestjs.io) for JavaScript testing. -To run the test, use `npx jest tests/e2e/env_spec.js`. +To run all tests, use `npm run test`. + +The specific test commands are defined in `package.json`. So you can also run the specific tests with other commands, e.g. `npm run test:unit` or `npx jest tests/e2e/env_spec.js`. ## Submitting Issues