CF Lab 01: Modular Patterns and Testing

Build Status

To Submit this Assignment

  • fork this repository
  • write all of your code in a directory named lab- + <your name> e.g. lab-toasty
  • push to your repository
  • submit a pull request to this repository
  • submit a link to your PR in canvas
  • write a question and observation on canvas

Resources

Description:

This assignment will have you create a simple Javascript object that will be exported using the Node modular pattern we went over in class.

Your object should have a function named 'cowsay' that takes a string as a parameter and returns a cow "saying" that string.

You should have at least one test that verifies the output of the function.

Your code should pass the .eslintrc included in this repository.

Your submission should be a link to your pull request.

Bonus:

For an extra point, create a command line utility that will be run using node cowsay.js 'some string' and will pass the input contained in that argument to the cowsay function and output the result to the screen.

For a second bonus point, write a test that makes sure that the arguments are being processed.

Requirements:

  • Proper Styling
  • Proper Submission
  • mocha/assert Test
  • Use of Modular Pattern/design of greet object/function