refactor based on angular generator after installed karma generator