Skip to content

@ui5/middleware-code-coverage - TypeScript support #189

Description

@matz3

Is your feature request related to a problem? Please describe.

The @ui5/middleware-code-coverage currently does not work within TypeScript based projects, e.g. created via easy-ui5 generators ts-app / ts-library.

Describe the solution you'd like

The client-side coverage feature should also be supported for TypeScript based projects.

Describe alternatives you've considered

Coverage for TypeScript sources can currently only be measured within a test-runner setup, e.g. Karma (needs karma-ui5-transpile.

Activity

  1. FrankVisuals commented on Jul 5, 2024

    @FrankVisuals

    Any chance typescript support is added soon?

  2. matz3 commented on Jul 15, 2024

    @matz3
    MemberAuthor

    It is not expected to be a straight-forward solution, which is why we didn't add it in the initial version.
    We are looking into options, but it's not likely to happen in the next months - sorry.

  3. srinivas-gururao commented on Jan 21, 2025

    @srinivas-gururao

    We are in need of similar requirement. When is it planned to support typescript project generated using easyui5-tslib?

  4. flovogt commented on Jan 21, 2025

    @flovogt
    Member

    @srinivas-gururao we are currently working on a concept to refactor how server middleware's are designed. See UI5/cli#1036 The implementation of this RFC is the foundation to later offer typescript support also in @ui5/middleware-code-coverage.

    We won't be able to work on this feature in the next months, but I hope to give an update in the second half of 2025.

    SAP internally this feature is tracked in CPOUI5FOUNDATION-865.

  5. tobiashofmann commented on Nov 18, 2025

    @tobiashofmann

    Hi @flovogt second half of 2025 is coming to an end. Can you already provide an update on this issue?

  6. flovogt commented on Nov 18, 2025

    @flovogt
    Member

    We are working on the new concept but I can not announce any concrete timeline for general availability. It will definitely be part of a next major version of UI5 CLI and not be downported to UI5 CLI v4.

  7. tobiashofmann commented on Nov 21, 2025

    @tobiashofmann

    In the meantime, there might be a workaround: I came accross the UI5 Typescript sample app that "solves" the code coverage problem. Using ui5-coverage.yaml istanbul is started and instruments the ts files.

    The result can be taken from window.__coverage__ and stored in a folder (.nyc_output) and the coverage report can be generated by running nyc report.

    Image

    This might be not as nice as the feature we get from middleware-code-coverage. Getting the JSON data from window.__coverage__ might be a problem if you are only using QUnit. In my case it works as I am using playwright/puppeteer.

    Maybe this helps someone to get the code coverage for a typescript app until the middleware is updated.

  8. flovogt commented on Feb 11, 2026

    @flovogt
    Member

    Backlog item is CPOUI5FOUNDATION-1203.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions