- about use of eval - whitespace before comments
|4 years ago|
|benchmark||5 years ago|
|node_modules||5 years ago|
|server||5 years ago|
|spec||4 years ago|
|.eslintrc.js||5 years ago|
|README.md||5 years ago|
|impact||5 years ago|
PEG.js Test Suites
This directory contains various test suites and scripts to ensure PEG.js works correctly.
- Spec Suite: Runs various test's that ensure PEG.js and it's generated parsers are working as intended. All tests should always pass on all supported platforms.
- Benchmark Suite: It measures speed of the parsers generated by PEG.js on various inputs. Its main goal is to provide data for code generator optimizations.
- Impact Script: Measures impact of a Git commit (or multiple commits) on generated parsers speed and size.
Download and Install
To run the PEG.js test suites you most download the and install the module via the git repository:
Make sure you have Node.js and Git installed.
Download via Git and change the currently working directory:
$ git clone https://github.com/pegjs/pegjs.git $ cd pegjs
Install all dependencies, including the development dependencies:
$ npm install
Install Gulp globally:
$ npm install gulp -g
Running in Node.js
The commands below need to be executed via the console from the PEG.js root directory (one level up from this one), after which they will output their results (if any).
Execute source code linting:
$ gulp lint
Execute the spec test suite:
$ gulp test
Execute the benchmark suite:
$ gulp benchmark
Execute the impact suite:
$ node test/impact
Running in the Browser
Serve the test suites using a web server:
$ node test/server/run
Point your browser to the test suite