Skip to content

alexr1221/3-musketeers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3 Musketeers

RDD, CDD and TDD

3-musketeers

Table of Contents

🐣 Introduction

Being a Good Programmer Isn't Just About Writing Code.

It's also writing documentations, comments and unit tests.

🎯 Objectives

  1. Write the README.md
  2. Write useful comments
  3. Complete the Unit Tests

for the library currency

👩‍💻 Just tell me what to do

  1. Fork the project via github

fork

  1. Clone your forked repository project https://github.com/YOUR_USERNAME/3-musketeers
cd /path/to/workspace
❯ git clone [email protected]:YOUR_USERNAME/3-musketeers.git
  1. Do things: README.md, comments and complete unit tests

  2. Commit your different modifications:

cd /path/to/workspace/3-musketeers
❯ git add -A && git commit -m "docs(readme): add usage section"
❯ git push origin master
  1. Don't forget to commit early, commit often and push often
❯ git push origin master

Note: if you catch an error about authentication, add your ssh to your github profile. If you need some helps on git commands, read git - the simple guide

🏃‍♀️ Steps to do

RDD and CDD

Understand first the library features

cd /path/to/workspace/3-musketeers/currency
❯ npm install # or yarn
❯ node cli.js

# chech what's going on and printed in the console
# ...
  1. Complete the currency/README.md file with a complete description of installation, usage... of the library
  2. Add block commments (use JSDoc format for instance) for the file currency/index.js only

TDD

  1. Run unit tests with npm test
❯ npm test # or yarn test

# chech what's going on and printed in the console
# ...
  1. Complete the unit tests (with Jest as testing framework) file currency/index.test.js to cover at least 80%

About Jest

  • Getting started with Jest
  • Jest uses matchers to let you test values in different ways.
  • When you're writing tests, you often need to check that values meet certain conditions. expect gives you access to a number of matchers that let you validate different things.

🛣️ Related course

Licence

Uncopyrighted

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 51.0%
  • HTML 35.8%
  • Makefile 10.0%
  • CSS 3.2%