Add unit tests for the functions using [chai](https://www.npmjs.com/package/chai). The tests should run with the command `npm run test`.