Enzyme shallow rendering for Angular2?

1.5k views Asked by At

Trying to test my UI components without rendering the whole child component tree inside, it was super easy to do in react/enzyme - is there anything similar in Angular2 world?

1

There are 1 answers

0
getsaf On

https://github.com/getsaf/shallow-render https://www.npmjs.com/package/shallow-render

I am the developer for shallow-render. I was a big fan of the enzyme model and you'll see a lot of similarities.

The goals I set out to solve were: * Automatically follow the dependency tree by following the Angular module tree. * Render ONLY the component in-test (everything else is a mock that shallow-renders).

It currently supports Angular 5x and will follow future Angular releases as they come out.