Simple module to compile pegjs files for Jest testing.
$ npm i -D pegjs-jest
or
$ yarn add --dev pegjs-jest
Under transform object, and a mapper to the transformer. Below is an example of mapping pegjs
files.
"transform": {
"^.+\\.pegjs?$": "pegjs-jest"
}