tntim96 / JSCover

JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage
GNU General Public License v2.0
399 stars 84 forks source link

JSCover is changing original lines of code . #250

Closed hiteshsardana99 closed 7 years ago

hiteshsardana99 commented 7 years ago

Whenever i am creating instrument code of javascript files. In one file , © ( copy right symbol ) and ® ( Registered trademark symbol) is changing into '\xc2\xa9\xc2\xae'

@©® is converting into @\xc2\xa9\xc2\xae .

Please help me out.

tntim96 commented 7 years ago

Those values are the hexadecimal equivalents and shouldn't be a problem in your coverage tests.

If you are finding the escaping is not correct, make sure you are using the correct file encoding.

hiteshsardana99 commented 7 years ago

Hello Sir, Can we change the name of jscoverage_serializeCoverageToJSON() function? Actually this function name is not in camel case format therefore I want to change its name to jsCoverageSerializeCoverageToJSON() .

tntim96 commented 7 years ago

That isn't configurable, but you could create your own by copying the current one. Changing the name would break it for other users.

Why do you need it changed?

hiteshsardana99 commented 7 years ago

How can i create my own function ? As I earlier told you that name of this function name is not according to the rules of camel casing.

tntim96 commented 7 years ago

How can i create my own function ?

I don't know your set up. Maybe you can't.

As I earlier told you that name of this function name is not according to the rules of camel casing.

But why does that matter?

hiteshsardana99 commented 7 years ago

I have to consider all the these things before writing code in my project.

Anyway, I want to clarify few things. When we use this function to fetch the report then where this function exist? . I have seen this function in every instrumented files or in jscoverage.js file.

tntim96 commented 7 years ago

It depends on your set-up. Which example will your project most closely match?

hiteshsardana99 commented 7 years ago

I am using file-system mode .

tntim96 commented 7 years ago

Take a look at localStorage-file-system and phantomJS-file-system then. They are working samples and should have enough code to get you started.