Most of these katas are taken from codewars.com and are to be completed with TDD. In some cases the descriptions have been modified so please read the README in each directory for instructions.
The dependencies you are likely to need for this project are listed in the package.json file. You will need to set up your tests yourself.
Remember that you can pend a test if you do not want it to run by prepending x to a describe
or it
block:
xdescribe('The function', function () {
it('Will pend anything inside this describe block', function () {
expect(1).to.equal(1);
});
});
Fork this repo and then clone it to your local machine:
$ git clone https://github.com/your-name/katas-with-TDD.git
Add and commit your work after every passing test:
$ git add <file names>
$ git commit -m <message>
Keep your forked copy of the repo up to date by pushing your work:
$ git push origin master
01-countingMonkeys - http://www.codewars.com/kata/count-the-monkeys
02-isStringUppercase - http://www.codewars.com/kata/is-the-string-uppercase
03-secondLargestNumber - http://www.codewars.com/kata/second-largest-in-array
04-surfaceAreaAndVolume - http://www.codewars.com/kata/surface-area-and-volume-of-a-box
05-middleCharacter - http://www.codewars.com/kata/get-the-middle-character
06-sumOfMultiples - http://www.codewars.com/kata/multiples-of-3-and-5
07-prizeDraw - http://www.codewars.com/kata/prize-draw
08-twoToOne - http://www.codewars.com/kata/two-to-one
09-initializeName - http://www.codewars.com/kata/initialize-my-name
10-isItATriangle - http://www.codewars.com/kata/is-this-a-triangle
11-whatTimeIsIt - http://www.codewars.com/kata/what-time-is-it
12-xMarksTheSpot - http://www.codewars.com/kata/x-marks-the-spot-1
13-anchorizeMe - http://www.codewars.com/kata/anchorize-me
14-euro2016 - http://www.codewars.com/kata/uefa-euro-2016
15-rearrangeNumber - http://www.codewars.com/kata/rearange-number-to-get-its-maximum
16-addErr - http://www.codewars.com/kata/please-help-bob
17-sanitizeHTML - http://www.codewars.com/kata/safen-user-input-part-i-htmlspecialchars
18-countZeroes - http://www.codewars.com/kata/count-number-of-zeros-from-1-to-n
19-shuffleArray - http://www.codewars.com/kata/shuffle-an-array-1
20-dnaMotif - http://www.codewars.com/kata/find-the-motif-in-dna-sequence
21-dinnerPlans - http://www.codewars.com/kata/dinner-plans
22-validHKNumber - http://www.codewars.com/kata/valid-hk-phone-number
23-onlyOne - http://www.codewars.com/kata/only-one
24-makeChessboard - [http://www.codewars.com/kata/draw-me-a-chessboard](http://www.codewars.com/kata/draw-me-a-chessboard
25-meanAndConcatenate - http://www.codewars.com/kata/calculate-mean-and-concatenate-string
All katas are distributed under a FreeBSD 2-Clause License.
Copyright (c) , All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.