tornaia / karma-sonarqube-unit-reporter

A Karma plugin. Unit tests execution report for SonarQube/Generic Coverage Plugin
MIT License
33 stars 28 forks source link

hard coded test module definition prevents a brouder usage of the unit-reporter #59

Open thomasnikolay opened 3 years ago

thomasnikolay commented 3 years ago

Our company use QUnit see https://en.wikipedia.org/wiki/QUnit for defining tests. Due the hardcoded https://github.com/tornaia/karma-sonarqube-unit-reporter/blob/83cd9a8c09e174427b26a793e48b609bcbe90088/src/file-util.js#L21 "describe(" is the tool limited to Jasmine or other tools which also using describe.

I created an additional feature to configure a string which is detected in the file.

Can you please add me as developer and can push the branch and create the pull request.

rkrisztian commented 2 years ago

This is very odd, indeed. Karma should never ever assume anything about the way tests are written. Reasons well described by the reporter already, but generated describe calls one way or another can easily break this logic, e.g., consider a Cucumber testing tool that generates describe calls through scenario implementations, and thus such calls will not happen directly in the test code.