Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hhsadiq/codility-es6-mocha-chai
JavaScript ES6 solutions to Codility sample problems with mocha/chai based unit tests.
https://github.com/hhsadiq/codility-es6-mocha-chai
chai codility codility-lessons codility-site-lessons codility-solutions codility-training es6 javascript mocha
Last synced: 3 months ago
JSON representation
JavaScript ES6 solutions to Codility sample problems with mocha/chai based unit tests.
- Host: GitHub
- URL: https://github.com/hhsadiq/codility-es6-mocha-chai
- Owner: hhsadiq
- License: mit
- Created: 2017-10-16T15:59:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-16T16:05:52.000Z (over 7 years ago)
- Last Synced: 2024-01-14T11:01:49.042Z (about 1 year ago)
- Topics: chai, codility, codility-lessons, codility-site-lessons, codility-solutions, codility-training, es6, javascript, mocha
- Language: JavaScript
- Size: 44.9 KB
- Stars: 15
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JavaScript ES2015 solutions to Codility lessons
These are solutions and associated unit tests for the questions in Codility using JavaScript ES2015 features. These solutions
specifically take advantage of ES2015 enhancements to the JavaScript language
and require the latest Node.js (>= v6.0.0) to work properly. As not all ES2015
features are available in V8 yet babel is being used to fill in the gaps (at
this point only the ES2015 module syntax is being transpiled by babel).### Setup the project
Once downloaded ensure that Node.js is installed and run the following commands
in this directory:
```bash
npm install
```### Running unit tests
The solutions are demonstrated by a set of unit tests which use the Mocha unit
test framework and Chai as an assertions library. These tests can be executed
at any time with:
```bash
npm test
```As part of the unit tests ESLint will also be run against all files to ensure
that the JavaScript is valid and follows best practice.### Linting source code
While executing ESLint by itself is not necessary (as it runs as part of the
unit test execution) you can choose to run it with:
```bash
npm run lint
```### Dependencies
This implementation of the solutions requires the following dependencies:* Node.js >= v6.0.0
* npm >= v3
* Mocha (installed via npm)
* Chai (installed via npm)
* Babel (installed via npm)