Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

UI5 Tooling Middleware behaves differently through karma-ui5 - request body not readable #410

@LukasHeimann

Description

@LukasHeimann

In UI5 Tooling, I can create a custom middleware: https://sap.github.io/ui5-tooling/pages/extensibility/CustomServerMiddleware/

The documentation states:

For this you can plug custom middleware implementations into the internal express server of the UI5 Server module.

This is nice, as, with express, you can use res.send(anyJSON) and it automatically takes care of the headers.

In karma-ui5, the middlewares of UI5 Tooling work out of the box, which is really nice, but it seems like express-based methods are missing from req and res. A middleware using res.send() works with ui5 serve, but fails within karma -- it needs to be replaced with res.setHeader('Content-Type', 'application/json'); res.end(JSON.stringify(...));.

Is this expected? Can improvements be made in karma-ui5 so that UI5 middleware behavior doesn't change when run through karma? Or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions