Add tests to the npm package.json file
Fix missing variable error