Skip to content

Commit

Permalink
[Docs] Clarify dev workflow in CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Explain that the test suite & linter run on built Enzyme;
Add guidance on dev workflow
  • Loading branch information
Jack Lewin authored and ljharb committed Oct 1, 2017
1 parent 38acea4 commit 41d833e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ npm run react:16

### Running Tests

The test suite runs on *built* Enzyme.

```bash
# build Enzyme locally before testing
npm run build

# run tests on whatever version of React is currently installed
npm test
```
Expand All @@ -56,7 +61,14 @@ npm test
npm run test:all
```

If you are actively developing, Enzyme will always need to be built with the latest changes.

For this, the recommended workflow is to have the build and tests watching for changes in separate terminals. This should provide you with ~realtime feedback:

```bash
# build Enzyme locally upon save
npm run build:watch

# faster feedback for TDD
npm run test:watch
```
Expand All @@ -66,10 +78,15 @@ npm run test:watch
This codebase adheres to the [Airbnb Styleguide](https://github.com/airbnb/javascript) and is
enforced using [ESLint](http://eslint.org/).

It is recommended that you install an eslint plugin for your editor of choice when working on this
As with the test suite, the linter will not fully pass unless it is running on *built* Enzyme. This is because the ESLint `import/*` rules rely on finding the target files in the filesystem (which won't be there unless they've been built).

It is recommended that you install an ESLint plugin for your editor of choice when working on this
codebase, however you can always check to see if the source code is compliant by running:

```bash
# build Enzyme locally before linting
npm run build

npm run lint
```

Expand Down

0 comments on commit 41d833e

Please sign in to comment.