Testing Web Components with Karma, Mocha & Chai

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
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • minimatch

    a glob matcher in javascript

  • Within the configuration file, the configuration code is put together by setting module.exports to point to a function which accepts one argument: the configuration object. Karma also needs to know which testing framework is being used like Jasmine, Mocha, etc. Using frameworks configuration option, we tell Karma we're using Mocha & Chai to write the tests. Then, we have files configuration option which uses the minimatch library to facilitate flexible but concise file expressions so you can easily list all of the files you want to include and exclude. For example in the above code, test/**/*.test.js will include all files with a ".test.js" extension in the test folder.

  • Testing-WebComponents

    Testing Web Components with Karma, Mocha & Chai.

  • Codes

  • 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
  • starter-wctest

  • Download the starter code so everyone can have the same starting point to test web components.

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