description about building and testing babylon in CONTRIBUTING.md (#6756)

developers maybe confuse about the steps of building and testings in the mono project
This commit is contained in:
Vincent Chan 2017-11-18 19:57:58 +08:00 committed by Daniel Tschinder
parent 7d534dc32c
commit 037b2025a6

View File

@ -231,6 +231,18 @@ descriptive name, and add the following:
* Add an `expected.json` file with the expected parser output. For added convenience, if there is no `expected.json` present, the test runner will generate one for you.
After writing tests for babylon, just build it by running:
```sh
$ make build-babylon
```
Then, to run the tests, use:
```sh
$ TEST_ONLY=babylon make test-only
```
#### Bootstrapping expected output
For both `@babel/plugin-x` and `babylon`, you can easily generate an `expected.js`/`expected.json` automatically by just providing `actual.js` and running the tests as you usually would.