Comprehensive coverage Jest+Playwright in Next.js TS

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

    the Istanbul command line interface

    This approach will create two json coverage files, which will be merged together by NYC. Therefore the results will be purely local. If You don't mind using online tools like Codecov or Coveralls for merging data from different tests, then go ahead and use them. They will probably also be more accurate. But if You still want to learn how to get coverage from E2E, then please read through

  • playwright-test-coverage

    Playwright Test (@playwright/test) demo to collect coverage information via Istanbul (by mxschmitt)

    Let's have a closer look on those dependencies: babel-plugin-istanbul: it is responsible for collecting coverage from Playwright tests. Here's the link to GitHub repository. You'll also need baseFixtures.ts file from this repo to make it run nyc: a tool I use to merge coverage reports together. It will create final report, which is an union of coverages from Jest and Playwright ts-jest: quite usefull as the focus is to test TypeScript app ts-node: needed to compile Jest config TS file back to JavaScript

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

  • Playwright

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

    I assume You know how to setup Next.js, Jest and Playwright (without coverage)

  • Next.js

    The React Framework

    I assume You know how to setup Next.js, Jest and Playwright (without coverage)

  • jest

    Delightful JavaScript Testing.

    I assume You know how to setup Next.js, Jest and Playwright (without coverage)

  • coveralls-public

    The public issue tracker for coveralls.io

    This approach will create two json coverage files, which will be merged together by NYC. Therefore the results will be purely local. If You don't mind using online tools like Codecov or Coveralls for merging data from different tests, then go ahead and use them. They will probably also be more accurate. But if You still want to learn how to get coverage from E2E, then please read through

  • babel-sublime

    Syntax definitions for ES6 JavaScript with React JSX extensions.

    It will hurt performance during testing and build as Babel (not SWC) will be used

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

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