ui5-community / generator-ui5-ts-app

Generator for UI5 applications using TypeScript which use the official UI5 tooling. This generator was built as a plug-in for the community project Easy UI5 by SAP.
Apache License 2.0
19 stars 15 forks source link

feature request: preview-middleware #35

Open heimwege opened 1 month ago

heimwege commented 1 month ago

Hi guys,

how about using the preview middleware to get rid of the test glue code?

Using this config in the ui5*.yaml (further configuration w.r.t paths, testfile name patterns, etc. is possible)

  - name: preview-middleware
    afterMiddleware: compression
    configuration:
      test:
        - framework: QUnit
        - framework: OPA5
        - framework: Testsuite

makes the following files superfluous:

Having this glue code centrally managed could be quite helpful in case the test recommended setup changes (e.g. because resources/sap/ui/test/starter/createSuite.js should be used).

Using this middleware might not only be relevant for the ts app generator but for other generators as well.