2017-11-10 1 views

답변

2

각형 문서에 의하면 You should write isolated unit tests for pipes and services. 격리 된 단위 테스트에는 테스트 베드가 필요하지 않습니다. (https://angular.io/guide/testing#isolated-unit-tests)
앵귤러 컴포넌트 테스트의 경우, 여전히 유닛 테스트로 간주되는 Testbed를 사용하고 싶을 것입니다. 지금이 말을 듣고 나는 다시 문서를 인용해야한다.
Good developers write both kinds of tests for the same application part, often in the same spec file. Write simple isolated unit tests to validate the part in isolation. Write Angular tests to validate the part as it interacts with Angular, updates the DOM, and collaborates with the rest of the application.

나는 이것이 도움이되기를 바란다.

관련 문제