solve ERROR of karma and run test successfully