This website requires JavaScript.
Explore
Help
Sign In
joepie91
/
pegjs
Watch
1
Star
0
Fork
You've already forked pegjs
0
Code
Issues
Pull requests
Releases
Wiki
Activity
5d6bd75619
pegjs
/
test
/
.eslintrc.json
7 lines
59 B
JSON
Raw
Normal View
History
Unescape
Escape
ESLint: Set environments better Instead of setting ESLint environment to "node" globally, set it on per-directory basis using separate .eslintrc.json files: Directory Environment ----------------------- bin node lib commonjs spec jasmine It was impossible to use this approach for the "benchmark" directory which contains a mix of files used in various environments. For benchmark/run, the environment is set inline. For the other files, as well as spec/helpers.js, the globals are declared manually (it is impossible to express how these files are used just by a list of environments). Fixes #408.
2016-01-29 14:36:56 +01:00
{
"env"
:
{
Pass spec code through Babel before serving it to the browser This will allow to use ES2015 constructs in spec code. The change required introducing a small server, which serves both PEG.js and spec code passed through Babel and bundled together. This allowed to convert the specs to regular modules and get rid of the hackery that was previously needed to make them run both in Node.js and in the browser. Note the specs no longer exercise the browser version. This will allow to spec PEG.js internals in the future. See #442.
2016-09-08 13:29:06 +02:00
"commonjs"
:
true
,
Switch from Jasmine to Mocha & Chai The switch is mostly mechanical, with assertions translated 1:1. The biggest non-mechanical part is rewriting Jasmine custom matchers as Chai helpers. The matchers were streamlined and simplified in the process and their messages were made more in line with messages produced by built-in Chai helpers. Fixes #409.
2016-12-08 08:59:04 +01:00
"mocha"
:
true
ESLint: Set environments better Instead of setting ESLint environment to "node" globally, set it on per-directory basis using separate .eslintrc.json files: Directory Environment ----------------------- bin node lib commonjs spec jasmine It was impossible to use this approach for the "benchmark" directory which contains a mix of files used in various environments. For benchmark/run, the environment is set inline. For the other files, as well as spec/helpers.js, the globals are declared manually (it is impossible to express how these files are used just by a list of environments). Fixes #408.
2016-01-29 14:36:56 +01:00
}
}
Reference in a new issue
Copy permalink