Test Svelte Component Using Vitest & Playwright

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

    Next generation testing framework powered by Vite.

  • I haven't tried this combination in my projects, but you can check the example from the Vitest GitHub repo: Use Playwright with Vitest as test runner

  • svelte-component-test-demo

    Demo of Svelte component test using Vitest & Playwright

  • In this article, I'll focus on the basic setup of Vitest & Playwright to test our Svelte components. You can check the demo repo here: Svelte Component Test Demo Repo

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

    uvu is an extremely fast and lightweight test runner for Node.js and the browser

  • Vitest: A Vite-native unit test framework. (alternative: Jest, uvu)

  • svelte-add-vitest

    Discontinued Svelte adder for Vitest

  • You can follow the below steps to setup Vitest or use the Svelte Adder: svelte-add-vitest

  • SvelteKit

    web development, streamlined (by sveltejs)

  • sveltejs/kit: Vitest for unit testing #5285

  • Playwright

    Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

  • Playwright: A framework for Web Testing and Automation. (alternative: Cypress)

  • jest

    Delightful JavaScript Testing.

  • Vitest: A Vite-native unit test framework. (alternative: Jest, uvu)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS 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