Fixed tests when run with `npm test`