diff --git a/README.md b/README.md index f63be48..e904d10 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,21 @@ globally on your machine. `yarn coverage` -- when run from project root, generates a coverage report for `host` and `app/client` +### How to regenerate snapshots if you have tests failing when running `yarn test`? + +in root `./` folder of project run this: + +``` +yarn test --updateSnapshot +``` + +in Deskreen Viewer `./app/client` folder of project run this: + +``` +cd app/client +SKIP_PREFLIGHT_CHECK=true yarn test:nowatch -- -u +``` + ## Instruction for running a local Sonar Qube, community edition ### Prerequisites diff --git a/doc/translations-docs/fix-a-typo-in-existing-translation-of-Deskreen.md b/doc/translations-docs/fix-a-typo-in-existing-translation-of-Deskreen.md index 927cef7..8ba6756 100644 --- a/doc/translations-docs/fix-a-typo-in-existing-translation-of-Deskreen.md +++ b/doc/translations-docs/fix-a-typo-in-existing-translation-of-Deskreen.md @@ -115,21 +115,21 @@ Docs coming soon. Stay tuned. ### When the Deskreen App edits done, then please fix tests if they are broken. And regenerate snapshots if needed. -Example to regenerate snapshots: -in root `./` folder of project +### How to regenerate snapshots if you have tests failing when running `yarn test`? + +in root `./` folder of project run this: ``` -yarn test -- -u (or yarn jest -- -u) +yarn test --updateSnapshot ``` -in root `./app/client` folder of project +in Deskreen Viewer `./app/client` folder of project run this: ``` -yarn test -- -u (or yarn jest -- -u) +cd app/client +SKIP_PREFLIGHT_CHECK=true yarn test:nowatch -- -u ``` -If that doesn't work for you to regenerate snaphosts, please google search how to do it. - ### IMPORTANT: Please make sure your PR is 1 or maximum 2 commits length. If it is longer than that, you will be asked to squash your PR commits. If you don't know how to squash, refer [this guide](#dont-know-code) ### After you done fixing, please submit your PR, it will be reviewed and if everything is ok it will be merged and you fix will be included in next release. Thank you! diff --git a/doc/translations-docs/how-to-add-new-language-translation-to-Deskreen.md b/doc/translations-docs/how-to-add-new-language-translation-to-Deskreen.md index 0a6f120..a5a4369 100644 --- a/doc/translations-docs/how-to-add-new-language-translation-to-Deskreen.md +++ b/doc/translations-docs/how-to-add-new-language-translation-to-Deskreen.md @@ -146,21 +146,21 @@ You need to add it in two places: 1. host app, that runs on a computer and 2. cl ### When the Deskreen App translations done, then please fix tests if they are broken. And regenerate snapshots if needed. -Example to regenerate snapshots: -in root `./` folder of project +### How to regenerate snapshots if you have tests failing when running `yarn test`? + +in root `./` folder of project run this: ``` -yarn test -- -u (or yarn jest -- -u) +yarn test --updateSnapshot ``` -in root `./app/client` folder of project +in Deskreen Viewer `./app/client` folder of project run this: ``` -yarn test -- -u (or yarn jest -- -u) +cd app/client +SKIP_PREFLIGHT_CHECK=true yarn test:nowatch -- -u ``` -If that doesn't work for you to regenerate snaphosts, please google search how to do it. - ### By this time you should be done with adding a translation. ### Add new language for Deskreen Website. Step By Step Guide for coders and people who know how to use git