Code Coverage for Typescript using karma-jasmine and istanbul

前端 未结 3 1575
名媛妹妹
名媛妹妹 2021-02-07 05:44

I am trying to get the Code Coverage for my typescript Code in karma framework using Istanbul in karma.conf typescript files are included and by karma typescript-preprocessor we

3条回答
  •  伪装坚强ぢ
    2021-02-07 06:29

    There is karma-remap-istanbul which integrates nicely remap-istanbul with karma. Documentation is pretty self explanatory but one thing - to have summary on the console the config is text: undefined (otherwise text output goes to the file).

    So it is possible to have coverage summary directly from karma however when ts sources are not available in the same directory as karma.config.js karma-remap-istanbul still needs some more development regarding configuration to be able to generate full html reports.

提交回复
热议问题