add pre-commit hook with npm test