View Code? Open in Web Editor
NEW
This project forked from fl-practice/01-node-ecosystem
Testing practice
node-ecosystem's Introduction
LAB
Author: Heather Cherewaty
greet.js and arithmetic.js
Exported Values and Methods
greeting.sayHello() -- returns null if no param passed in
greeting.sayHello(randomNameOne, randomNameTwo) -- returns null if given more than 1 name
greeting.sayHello(randomNumber) -- returns null if a number is passed in
greeting.sayHello(World) -- returns 'Hello, World!'
arithmetic.add(randomNumber, randomNumberTwo) -- returns sum of randomNumber and randomNumberTwo
arithmetic.add('meow', 'woof') -- returns null if given strings as input
arithmetic.subtract(randomNumber, randomNumberTwo) -- returns the result of randomNumber one minus randomNumberTwo
arithmetic.subtract('meow', 'woof') -- returns null if given strings as input
arithmetic.multiply(randomNumber, randomNumberTwo) -- returns product of randomNumber one times randomNumberTwo
arithmetic.multiply('woof', 'meow') -- returns null if given strings as input
arithmetic.divide(randomNumber, randomNumberTwo) -- returns the result of randomNumber divideed by randomNumberTwo
arithmetic.divide('woof', 'meow') - returns null if given strings as input
npm start
- Endpoint:
/
- Returns console.log values from tests run on modules.
- npm test (runs unit tests)
- npm run lint (runs linter tests)
node-ecosystem's People
Contributors
Watchers