Mega project
- From Scratch!
Create a project that someone can checkout, install dependencies easily and be able to run a single command in the terminal to run the test suite. Learning objective: Project setup & debugging. - Reverse Polish Notation
Implement reverse polish notation using baby stepped TDD. Learning objective: Take small steps when implementing. - Vending Machine
Implement a vending machine against an acceptance test. Learning objective: writing clean unit tests that only use the implementation of the class under test. - Bowling Scoring Open Closed
Take in a series of scores for each ball a person bowls in a bowling game and return the resulting game score. Learning focus: Open/Closed principle. - Reverse Polish Notation to Infix
Implement reverse polish notation to infix using baby stepped TDD. Learning objective: Take small steps when implementing. - Conditional-less Rock, Paper, Scissors
Implement rock, paper, scissors without using conditionalsif
's etc. Learning objective: Replace conditional with polymorphism. - Shopping checkout (Primitives) Implement the code for a supermarket checkout that calculates the total price of a number of items. Learning objective: primitive obsession.
- Shopping checkout (Flux) Implement the code for a supermarket checkout that calculates the total price of a number of items. Learning objective: Learn about flux and unidirectional data flow architecture.
- Coin recognition Implement the coin recognition from the vending machine kata but write isolated unit tests. Learning objective: unit test isolation, dependency injection, mocking.
- https://github.com/jtburke/js-code-katas/fork
- https://help.github.com/articles/configuring-a-remote-for-a-fork/
git remote add upstream https://github.com/jtburke/js-code-katas.git
- https://help.github.com/articles/syncing-a-fork/
# Checkout your master branch
git checkout master
# Merge changes from upstream master
git merge upstream/master
## Installing dependencies
- Navigate to mega project
cd ~/workspace/code-dojo-js
- Install dependencies
npm install
- Open desired kata
cd ./xx-kata-name
- Install dependencies
npm install
- Run Tests
npm test
https://github.com/airbnb/javascript
http://eslint.org/
There should be some runnable configs for mocha in intellij. The project was created using IntelliJ 13 so it may or may not work for you. If you'd like to create your own mocha configs:
Extra Mocha Options: "test/**/*Test.js" --compilers js:babel/register --require "test/helpers/helper.js"
The test framework is mocha and the assertion library is chai, sinon and sinon-chai have also been included for you. There is a helper.js file that includes mocha, chai, sinon and sinon-chai and sets up chai with the should style of assertions to save you having to do it in each test file.
http://ricostacruz.com/cheatsheets/mocha.html
http://ricostacruz.com/cheatsheets/chai.html
http://ricostacruz.com/cheatsheets/sinon-chai.html