In the initial commit to this project, you have been provided with files that contain a JavaScript module and some associated tests. Currently the calculateScore
function returns 0
for unknown positions which is causing the tests to fail. Your task is to rework this function so that it works as expected, making the tests pass.
.eslintrc.js - a config file for eslint
scoring.js - this file contains a JavaScript module called scoring with a calculateScore
function. This function calls all of the other calculation functions to get a total score.
tests.js - this file contains tests for the calculateScore
function in the scoring
module
package.json - this file sets up the Node project including all the dev dependencies
.gitignore - this file sets the project up to ignore the node_modules folder when committing to git
You should submit your working changes in a pull request.