- 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
.gitignore
file - .eslintrc - contains the provided
.eslintrc
file - .eslintignore - contains the provided
.eslintignore
file - lib/ - should contain your modules
- test/ - should contain your unit tests
- create a node.js module (
greet.js
) that exports a single function- the
greet
function should have a single parameter that should expect a string as it's input - the
greet
function should return the input name, concatenated with "hello " - the
greet
function should returnnull
if the input is not a string
- the
- create a node.js module named
arithmetic.js
- this module should have
add
andsub
methods - the
add
method should contain 2 parameters- these parameters should be numbers and the method should return the sum of the 2 numbers
- the
sub
method 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
add
andsubtract
methods 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.md
file)
- 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