Coder Social home page Coder Social logo

js-training-tdd's Introduction

JS Training with TDD

Credits: Clément Denis for the original repo.

Setup

1. Get this repo

First, fork this repository: you'll then have a copy of this repo under your GitHub account.

Then go to wherever you store your development work, and run these commands to clone the forked repo (replace GITHUB_LOGIN with your login):

# download your code locally
git clone https://github.com/GITHUB_LOGIN/js-training-tdd.git

# change working directory to the newly cloned repository
cd js-training-tdd

Prerequisites: you must have installed Git!

Node.js is a platform which makes it possible to run JavaScript code outside the web browser.

You have to install Node.js, preferably not with the packages on Node's download page.

2. Install Node.js

On Linux/MacOS

Note for Linux users: before going further, run which curl in the terminal. If it shows something (e.g. /usr/bin/curl), you're good! Otherwise, run sudo apt install -y curl (Ubuntu/Debian) to install cURL.

You are going to use NVM (Node Version Manager). Here's a summary of what you have to do (see installation instructions on the NVM repo for more details). Run these commands in your terminal:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install v12.16.1
nvm use v12.16.1

You can verify that it worked by running node -v, which should display:

v12.16.1

On Windows

The original NVM doesn't support Windows. You're going to use NVM for Windows. Get to the releases page. Under the latest version (1.1.7 as of September 2019), download the nvm-setup.zip file (or use this direct link).

Extract the archive, and run nvm-setup.exe. Complete the setup wizard. Then, quit Git Bash if it is running, re-launch it, and type:

nvm install v12.16.1
nvm use v12.16.1

Running node -v should display: v12.16.1.

Testing

Once you have coded your masterpiece, you can start testing your solutions.

You can run tests for a single section:

# run the test runner with args ( basics, advanced, math, get)
./tester basics

output-tester-basics

Later on, you may use tester with no argument, to check exercises from all sections (in this example, basics, math and part of str have been solved):

# run the test runner
./tester

output-tester

Solving

You can start editing the JavaScript files with your favorite text editor i.e. VSCode, Atom, Sublime Text, etc.

where-to-code

Get Help!

We maintain an example-based code documentation

All you need to know to solve those exercises is described in them.

And we also made you a curated list of all the most useful methods:

(*) methods in italics are NOT pure (using them with the same arguments won't return the same result). They must be used with caution as it is harder to predict their results

js-training-tdd's People

Contributors

akabab avatar bhubr avatar emmadal avatar kigiri avatar laetitiaouelle avatar lfoussat avatar

Stargazers

 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.