All contributions to this project are welcome. Developers planning to contribute should follow the Contribution Guidelines
The project is managed using npm.
For a list of available task, type
npm run
The following sections show the available options in detail.
A MongoDB 3.2+ instance is required to run tests. You can deploy one by using the commodity
docker-compose-dev.yml
:
docker-compose -f docker-compose-dev.yml up -d
To run docker compose you will need docker and docker-compose.
Mocha Test Runner + Should.js Assertion Library.
The test environment is preconfigured to run BDD testing style.
Module mocking during testing can be done with proxyquire
To run tests, type
npm test
There are additional targets starting with test:
prefix to run specific test subsets isolatedly. For instance, the
test:expressions
target runs the subset of tests related with expression language feature:
npm run test:expressions
To debug the code while running run tests, type
npm run test:debug
In the console the link to the debugger will be provided. You can connect to it via Chrome, for example, by opening the
following url: chrome://inspect
.
Additional debug clients are listed on node.js.
ESLint
Uses the provided .eslintrc.json
flag file. To check source code style, type
npm run lint
Support for continuous testing by modifying a src file or a test. For continuous testing, type
npm run test:watch
If you want to continuously check also source code style, use instead:
npm run watch
Istanbul
Analyze the code coverage of your tests.
To generate an HTML coverage report under site/coverage/
and to print out a summary, type
# Use git-bash on Windows
npm run test:coverage
Removes node_modules
and coverage
folders, and package-lock.json
file so that a fresh copy of the project is
restored.
# Use git-bash on Windows
npm run clean
Checks the Markdown documentation for consistency
# Use git-bash on Windows
npm run lint:md
Uses the provided .textlintrc
flag file. To check the Markdown documentation for spelling and grammar errors, dead
links & etc.
# Use git-bash on Windows
npm run lint:text
Removes node_modules
and coverage
folders, and package-lock.json
file so that a fresh copy of the project is
restored.
# Use git-bash on Windows
npm run clean
Runs the prettier code formatter to ensure consistent code style (whitespacing, parameter placement and breakup of long lines etc.) within the codebase.
# Use git-bash on Windows
npm run prettier
To ensure consistent Markdown formatting run the following:
# Use git-bash on Windows
npm run prettier:text