Trying to setup Vitest with a Typescript, but I can't figure out how to set it up properly. Looking for an example projects.

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

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
  • expect-type

    Compile-time tests for types. Useful to make sure types don't regress into being overly-permissive as changes go in over time.

  • In case you're curious, right now I've finally settled for expect-type. Errors are shown at compile time, but to actually run the test I will just use the typescript compiler or ts-node. Will finish the tests tomorrow and see which option works better.

  • Playwright

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

  • If you have some spare time, I would suggest to set up a small `vite` playground by using their boilerplate, throw `vitest` on top and get hands dirty - worked for me out of the box. Another option could be to go 'old school' and try out `jest` with a tiny `commonjs` app (for stability, since, as you mentioned, ESM is still not fully there yet in this case). Regarding e2e / integration, please take a look at playwright (my favorite tool for the task). In short it `is a framework for Web Testing and Automation`, ref: https://github.com/microsoft/playwright

  • 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