How to add configuration of Unit test cases - Karma-ui5, Qunit
sunnyyadav100 opened this issue · comments
Please provide a guide about adding and running test cases of Qunit, Karma-UI5 in the typescript project. Presently getting below error since the project codebase is in 'webapp' folder -
Error: Could not find application directory of project oaui: //oaui/webapp
Even if provide a path of 'src' folder tests are not executing.
Finally, you can take a look into the PR #20 - it showcases how the TypeScript/Qunit/Karma testing works. To make it work, you need the UI5 tooling, the ui5-tooling-transpile
and the karma-ui5-transpile
plugin. You can take a look into the Step-by-Step guide here: https://github.com/SAP-samples/ui5-typescript-helloworld/blob/testingAndCoverage/step-by-step.md#12-enable-typescript-support-for-the-test-code-bonus
Once merged, the content of the testing will reside in the testing
branch
The testing can be found in the testing branch:
https://github.com/SAP-samples/ui5-typescript-helloworld/tree/testing
The step-by-step guide now also includes the testing topic:
https://github.com/SAP-samples/ui5-typescript-helloworld/blob/testing/step-by-step.md