2012-02-27 19:59:54 +01:00
|
|
|
PEG.js Spec Suite
|
|
|
|
=================
|
|
|
|
|
|
|
|
This is the PEG.js spec suite. It ensures PEG.js works correctly. All specs
|
|
|
|
should always pass on all supported platforms.
|
|
|
|
|
2014-05-09 15:04:56 +02:00
|
|
|
Running in Node.js
|
|
|
|
------------------
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2014-05-09 15:04:56 +02:00
|
|
|
All commands in the following steps need to be executed in PEG.js root directory
|
|
|
|
(one level up from this one).
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2014-05-09 15:04:56 +02:00
|
|
|
1. Install all PEG.js dependencies, including development ones:
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2016-05-05 10:15:28 +02:00
|
|
|
```console
|
|
|
|
$ npm install
|
|
|
|
```
|
2012-11-10 14:21:14 +01:00
|
|
|
|
2014-05-09 15:04:56 +02:00
|
|
|
2. Execute the spec suite:
|
2012-11-10 14:21:14 +01:00
|
|
|
|
2016-05-05 10:15:28 +02:00
|
|
|
```console
|
|
|
|
$ make spec
|
|
|
|
```
|
2012-11-10 14:21:14 +01:00
|
|
|
|
2014-05-09 15:04:56 +02:00
|
|
|
3. Watch the specs pass (or fail).
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2014-05-10 16:40:39 +02:00
|
|
|
Running in the Browser
|
2014-05-09 15:04:56 +02:00
|
|
|
----------------------
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2014-05-09 15:04:56 +02:00
|
|
|
All commands in the following steps need to be executed in PEG.js root directory
|
|
|
|
(one level up from this one).
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2016-05-05 17:35:40 +02:00
|
|
|
1. Make sure you have Node.js installed.
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2014-05-09 15:04:56 +02:00
|
|
|
2. Install all PEG.js dependencies, including development ones:
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2016-05-05 10:15:28 +02:00
|
|
|
```console
|
|
|
|
$ npm install
|
|
|
|
```
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2016-09-08 13:29:06 +02:00
|
|
|
3. Serve the spec suite using a web server:
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2016-05-05 10:15:28 +02:00
|
|
|
```console
|
2016-09-08 13:29:06 +02:00
|
|
|
$ spec/server
|
2016-05-05 10:15:28 +02:00
|
|
|
```
|
2012-02-27 19:59:54 +01:00
|
|
|
|
2016-09-08 13:29:06 +02:00
|
|
|
4. Point your browser to the [spec suite](http://localhost:8000/).
|
2014-05-09 15:04:56 +02:00
|
|
|
|
2016-09-08 13:29:06 +02:00
|
|
|
5. Watch the specs pass (or fail).
|