Fixed testing: npm test builds, tests and returns code as expected