Unit testing library for Angular application

This page summarizes the projects mentioned and recommended in the original post on /r/Angular2

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • Protractor

    E2E test framework for Angular apps

  • ng-mocks

    Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup

  • Correct. When unit testing, you want to test the unit (parent component) in isolation. To do this, you can use something like ng-mocks (my personal favorite) to create mock components. You could also use the NO_ERRORS_SCHEMA but I don't recommend this because I like to verify that my component loads w/ all of its dependencies (even if the are just mocks). If you test your parent component w/ all of its child components, then you are doing a form of integration testing. I tend to refer to it as a grey area between unit and integration testing because there are valuable tests that can be written fairly easily and cheaply that don't truly isolate parent components from their child components.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts