- work in a fork of this repository
- work in a branch on your fork
- write all of your code in a directory named
lab-+<your name>e.g.lab-susan - submit a pull request to this repository
- submit a link to your pull request on canvas
- submit a question, observation, and how long you spent on canvas
- include the following:
- README.md - contains documentation about your lab
- .gitignore - contains a robust
.gitignorefile - .eslintrc - contains the provided
.eslintrcfile - .eslintignore - contains the provided
.eslintignorefile - lib/ - should contain your modules
- test/ - should contain your unit tests
- create a node.js module (
greet.js) that exports a single function- the
greetfunction should have a single parameter that should expect a string as it's input - the
greetfunction should return the input name, concatenated with "hello " - the
greetfunction should returnnullif the input is not a string
- the
- create a node.js module named
arithmetic.js- this module should have
addandsubmethods - the
addmethod should contain 2 parameters- these parameters should be numbers and the method should return the sum of the 2 numbers
- the
submethod should contain 2 parameters- these parameters should be numbers and the method should return the first number minus the second number
- this module should have
- decide on the expected behavior for non-number inputs
- write a test the expects the greet module to return "hello world!"
- this should happen when invoked with "world!" as a parameter
- write a test for the
addandsubtractmethods on the arithmetic module- this should ensure that your functions work with number inputs
- write a description of your project (this should be in your
README.mdfile)
- write a test that expects the greet module to return null when you use non string values
- write a test that ensures the functions work as expected with non number inputs
- 2pts configuration
- 3pts feature tasks
- 3pts tests
- 2pts documentation