How do I unit test my *browser only* typescript project with modules using jest?

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

    A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript.

  • I've spent the last 6 hours googling for a solution. I found an issue on ts-jest Github, but the response is basically the maintainers saying "not our problem". They link to an older Feature Request issue, that is hanging open since last september with no answer either.

  • owl

    OWL: A web framework for structured, dynamic and maintainable applications (by odoo)

  • not sure what your issue is, but it definitely is possible. https://github.com/odoo/owl is a typescript project, for the browser, with jest as testrunner. No issue. Maybe compare the package.json with yours, it may give you a clue?

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

  • Sure, here's the code, specifically the branch refactor-and-tests. And yes, I know the SCSS code is bad. I'll be rewriting it later.

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