Repository files navigation 01: Node Ecosystem
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 return null if the input is not a string
create a node.js module named arithmetic.js
this module should have add and sub 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
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 and subtract 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
About
Lab 01 - Node Ecosystem
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.