| 1 | PEG.js Spec Suite |
| 2 | ================= |
| 3 | |
| 4 | This is the PEG.js spec suite. It ensures PEG.js works correctly. All specs |
| 5 | should always pass on all supported platforms. |
| 6 | |
| 7 | Running in Node.js |
| 8 | ------------------ |
| 9 | |
| 10 | All commands in the following steps need to be executed in PEG.js root directory |
| 11 | (one level up from this one). |
| 12 | |
| 13 | 1. Install all PEG.js dependencies, including development ones: |
| 14 | |
| 15 | ```console |
| 16 | $ npm install |
| 17 | ``` |
| 18 | |
| 19 | 2. Execute the spec suite: |
| 20 | |
| 21 | ```console |
| 22 | $ make spec |
| 23 | ``` |
| 24 | |
| 25 | 3. Watch the specs pass (or fail). |
| 26 | |
| 27 | Running in the Browser |
| 28 | ---------------------- |
| 29 | |
| 30 | All commands in the following steps need to be executed in PEG.js root directory |
| 31 | (one level up from this one). |
| 32 | |
| 33 | 1. Make sure you have Node.js installed. |
| 34 | |
| 35 | 2. Install all PEG.js dependencies, including development ones: |
| 36 | |
| 37 | ```console |
| 38 | $ npm install |
| 39 | ``` |
| 40 | |
| 41 | 3. Build browser version of PEG.js: |
| 42 | |
| 43 | ```console |
| 44 | $ make browser |
| 45 | ``` |
| 46 | |
| 47 | 4. Serve PEG.js root directory using a web server: |
| 48 | |
| 49 | ```console |
| 50 | $ node_modules/.bin/http-server |
| 51 | ``` |
| 52 | |
| 53 | 5. Point your browser to the [spec suite](http://localhost:8080/spec/index.html). |
| 54 | |
| 55 | 6. Watch the specs pass (or fail). |