1.0.6 • Published 8 years ago
assignment6 v1.0.6
ucsc assignment6
Features
checkword.js exports a function that takes in 2 arguments, first arg is a word, second arg is words array. If second arg array contains first arg, the function will flag the first arg as inappropriate for the array, otherwise it will show it's OK for the array.
Installation
npm install assignment6
tests
test.js include several test cases for the checkWord function.
- test 1 shows function flags the first arg as inappropriate for the array that contains it.
- test 2 shows function flags the first arg as OK for the array that does not contains it.
- test 3 shows function flags error when second arg is not an array.
- test 4/5 show function flags error when arguments are not provided as required.
- to run the tests, use
node test