assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

Enhancement: Generate test coverage report after npm test

Open JesseCodeBones opened this issue 3 years ago • 2 comments

Currently, the project do not have test coverage feature, and we donot know if the test is enough or not. So I suggest if we can have test coverage feature, it is better for us to control test or CI flow in the future. I will introduce C8 here: Here is the website and documentation of C8: https://www.npmjs.com/package/c8 C8 can generate html report, text report, cobertura report and etc. Here is report screenshot: image image it also report directly during test run: image The report will generated under ./coverage folder, of cause it should be git ignored.

JesseCodeBones avatar May 11 '22 08:05 JesseCodeBones

I created one PR, please kindly review and decide if we need this feature, thank you: https://github.com/AssemblyScript/assemblyscript/pull/2294

JesseCodeBones avatar May 11 '22 08:05 JesseCodeBones

I skiped the lib folder and created a new PR, please kindly check, thanks.

JesseCodeBones avatar May 13 '22 01:05 JesseCodeBones

Optional code coverage has been added in #2517 in spirit of #2294. There's some documentation. Do you want to keep this issue open to track further progress, or can we close?

dcodeIO avatar Sep 23 '22 15:09 dcodeIO

@dcodeIO I will close it, for the test progress, I think it is suitable to divide them with different functionalities.

JesseCodeBones avatar Sep 24 '22 07:09 JesseCodeBones