Unit testing web components with ava and jsdom

This page summarizes the projects mentioned and recommended in the original post on dev.to

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
  • ava

    Node.js test runner that lets you develop with confidence 🚀

  • This post provides an example of how to set-up web component unit testing using ava and jsdom.

  • jsdom

    A JavaScript implementation of various web standards, for use with Node.js

  • Jsdom is a pure Javascript implementation of HTML and DOM. Starting with v16, jsdom provides a customElements API implementation.

  • 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
  • ficusjs-ava-test

    Example unit testing web components with ava and jsdom

  • A repo containing the source code for this example is available at https://github.com/ducksoupdev/ficusjs-ava-test.

  • Cypress

    Fast, easy and reliable testing for anything that runs in a browser.

  • Due to this friction and complication, I typically use an E2E testing framework like Cypress which runs tests against a real browser like headless Chrome.

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