{"repo":"getsaf/shallow-render","free":true,"listed":false,"github":"https://github.com/getsaf/shallow-render","clone":"git clone https://github.com/getsaf/shallow-render.git","description":"Angular testing made easy with shallow rendering and easy mocking. https://getsaf.github.io/shallow-render","language":"TypeScript","stars":273,"topics":["testing","mock","angular","enzyme","typescript","testbed"],"license":"MIT","category":"dev-tools","readme_excerpt":"shallow-render Angular testing made easy with shallow rendering and easy mocking. --- Looking For Help Maintaining This Library! Hey all, I do plan on continuing to update this library as Angular provides updates. This is not easy for me to do as I don't work with Angular in my current job. Any additonal support would be very appreciated! Please reach out if you want to be a help! Docs - API Docs - Example Tests - Release Notes Schematics - Angular Schematics (thanks @mihalcan!) Articles - Testing Angular Components With shallow-render - Advanced shallow-render Testing - Why Shallow Rendering is Important Angular Version Support Angular shallow-render ------- -------------- 20x 20x 19x 19x 18x 18x 17x 17x 16x 16x 15x 15x 14x 14x 13x 13x 12x 12x 11x 11x 10x 10x 9x 9x 6x-8x 8x 5x <= 7.2.0 Super Simple Tests The problem Testing in Angular is HARD . TestBed is powerful but its use in component specs ends with lots of duplication. Here's a standard TestBed spec for a component that uses a few other components, a directive and a pipe and handles click events: Whew!!! That was a lot of boilerplate. Here's just some of the issues: - Our TestBed module looks very similar if not identical to the NgModule I've probably already added MyComponent too. Total module duplication. - Since I've duplicated my module in my spec, I'm not actually sure the real module was setup correctly. - I've used REAL components and services in my spec which means I have not isolated the component I'm interest","default_branch":null,"files":null,"tree":[],"storefront":"/r/getsaf","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/getsaf/shallow-render/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}