MannieJay / LS-Testing-Mini

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing - Mini

Topics:

  • Mocha
  • Chai
  • Sinon
  • Assert
  • Expect

Project Description

  • The objective is to get you exposed to unit testing with Mocha/Chai and Sinon.
  • You will be writing tests for the code inside of src/app.js.

Initialize Project

  • cd into repo and run npm install

Pre Set Up

  • You'll notice we have two directories src and test. Inside of src/app.js you'll see all the code that we want to test, being exported out of app.js in the bottom of the file.
  • Go ahead and run npm test and it will exectute the testing suites.

Steps for implementing Tests

  • Step 1: You have a broken test suite already, go ahead and change each test assertion such that it passes the expected test. Everything begins on line 14 inside of tests/app.test.js begin there.

Resources

About


Languages

Language:JavaScript 100.0%