Giter Site home page Giter Site logo

waterlink / refactoring-koans-js Goto Github PK

View Code? Open in Web Editor NEW
17.0 5.0 1.0 16 KB

Refactoring Koans to help you learn to refactor code smells in javascript

License: MIT License

JavaScript 100.00%
javascript clean-code refactoring software-crafters nodejs testing koans

refactoring-koans-js's Introduction

Refactoring Koans

JavaScript edition

Setting up

First, clone this repository:

$ git clone https://github.com/waterlink/refactoring-koans-js

Make sure you have a recent version of node and npm installed.

Then, install the dependencies (only for running tests):

$ npm install

Run the Koans (tests)

$ npm test

Meditate on Koans

Go through directories/files in the order of their numbers (digits in front of the directory/file names).

Familiarize yourself with the code in non-spec file *.js (without .spec.).

Then switch to the Koan (test) file *.spec.js. You’ll see that the first few tests are just checking that the program works.

Then you’ll see a bunch of xdescribe(…) blocks. These are the pending Koans (tests).

Go through them in order, one-by-one, top-to-bottom. To start solving a Koan, remove the x in front of describe, so it reads describe(…).

Once the test is passing, you can move to the next xdescribe. Make sure to read the descriptions of these xdescribes and their respective its, you can find a clue there.

Notes

The code is in simple NodeJS, without any transpilers.

While this is still a work in progress, feedback from you would be fantastic! You can do it in the issues, or on Twitter.

Finally, if you liked these koans, make sure to share it with your friends and following on social media!

refactoring-koans-js's People

Contributors

waterlink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.