From 35ebcc2548c2a9f3b1df7b08f3639431d9856e72 Mon Sep 17 00:00:00 2001 From: Austin Wood Date: Mon, 26 Mar 2018 21:00:39 -0700 Subject: [PATCH] Add troubleshooting documentation for running jest in watch mode (#64) --- .all-contributorsrc | 12 +++++++++++- README.md | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 3567ee1a..8bf7e367 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -64,6 +64,16 @@ "contributions": [ "bug" ] + }, + { + "login": "indiesquidge", + "name": "Austin Wood", + "avatar_url": "https://avatars3.githubusercontent.com/u/3409645?v=4", + "profile": "https://github.com/indiesquidge", + "contributions": [ + "doc" + ] } - ] + ], + "repoType": "github" } diff --git a/README.md b/README.md index 508472dd..2ef2773b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ workshop repo to teach you about testing JavaScript applications. [![AppVeyor Build Status][win-build-badge]][win-build] [![Code Coverage][coverage-badge]][coverage] [![MIT License][license-badge]][license] -[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] @@ -46,9 +46,9 @@ workshop repo to teach you about testing JavaScript applications. ## Topics covered -1. Unit Testing with [Jest](http://facebook.github.io/jest) -2. Integration Testing with [Jest](http://facebook.github.io/jest) -3. End to End (E2E) Testing with [Cypress](https://www.cypress.io/) +1. Unit Testing with [Jest](http://facebook.github.io/jest) +2. Integration Testing with [Jest](http://facebook.github.io/jest) +3. End to End (E2E) Testing with [Cypress](https://www.cypress.io/) We'll mention other forms of testing, but these are the types we'll focus on and learn in this workshop. Learn more about the course goals and specific topics @@ -230,6 +230,29 @@ help if I can. +
+ +"npm test" command not working; "./jest" command not working + +When attempting to run Jest in watch mode, you may encounter an error that says +something like: + +``` +`fsevents` unavailable (this watcher can only be used on Darwin)' +``` + +Jest watch mode has a dependency on a tool called `watchman`, which needs to be +installed globally on your machine. + +To fix this error, please make sure you have [watchman][watchman] installed for +your preferred operating system. + +NOTE: installing `watchman` via `npm` installs an outdated version of the package. +To get the latest version of `watchman`, it is preferred that you install through +your operating system's package manager instead. + +
+ ## Structure This project has a bit of a unique setup. Normally you'll have just a single @@ -246,8 +269,8 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds -| [
Kent C. Dodds](https://kentcdodds.com)
[💻](https://github.com/kentcdodds/testing-workshop/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/testing-workshop/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/testing-workshop/commits?author=kentcdodds "Tests") | [
Osama Jandali](https://github.com/osamajandali)
[💻](https://github.com/kentcdodds/testing-workshop/commits?author=osamajandali "Code") [🎨](#design-osamajandali "Design") | [
Stefan Ivic](http://stefanivic.me/)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Astefanivic "Bug reports") | [
Nick Klepinger](https://github.com/bodiddlie)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Abodiddlie "Bug reports") | [
Abinav Seelan](http://abinavseelan.com)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Aabinavseelan "Bug reports") | [
Philip Sotirov](http://philipsotirov.com)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Afipo "Bug reports") | -| :---: | :---: | :---: | :---: | :---: | :---: | +| [
Kent C. Dodds](https://kentcdodds.com)
[💻](https://github.com/kentcdodds/testing-workshop/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/testing-workshop/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/testing-workshop/commits?author=kentcdodds "Tests") | [
Osama Jandali](https://github.com/osamajandali)
[💻](https://github.com/kentcdodds/testing-workshop/commits?author=osamajandali "Code") [🎨](#design-osamajandali "Design") | [
Stefan Ivic](http://stefanivic.me/)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Astefanivic "Bug reports") | [
Nick Klepinger](https://github.com/bodiddlie)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Abodiddlie "Bug reports") | [
Abinav Seelan](http://abinavseelan.com)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Aabinavseelan "Bug reports") | [
Philip Sotirov](http://philipsotirov.com)
[🐛](https://github.com/kentcdodds/testing-workshop/issues?q=author%3Afipo "Bug reports") | [
Austin Wood](https://github.com/indiesquidge)
[📖](https://github.com/kentcdodds/testing-workshop/commits?author=indiesquidge "Documentation") | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | @@ -287,3 +310,4 @@ MIT [win-build]: https://ci.appveyor.com/project/kentcdodds/testing-workshop [coverage-badge]: https://img.shields.io/codecov/c/github/kentcdodds/testing-workshop.svg?style=flat-square [coverage]: https://codecov.io/github/kentcdodds/testing-workshop +[watchman]: https://facebook.github.io/watchman/docs/install.html