Unit Testing vs End-end Testing (Test-Café & Mocha/Chai)

Brief Intro:

Unit Testing(Mocha/Chai)

function sum(firstNumber, secondNumber){  return +firstNumber + +secondNumber}function subtract (firstNum, secondNum){  return firstNum - secondNum}module.exports = { //to export it for our tests to utilizesum,subtract,}console.log("It can sum 1 and 2", sum(1,2) === 3)// simplified test
Mocha/Chai unit testing for the functions we made above

End-to-end Testing(Test-Café)

Tests for my website snack maps verifying the sign up process works as well as the help video shows when clicked. I first select the elements on my page using CSS selectors and set them to variables. Then I use the functions that come along with ‘t’ in order to test that clicking my sign in button opens the sign up modal, inputting sign up data returns a successful sign-up message, and then clicking the ‘x’ on the sign up modal closes itself.

Full-Stack Engineer and Video Game Connoisseur