Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all articles
Browse latest Browse all 1864

Commented Unassigned: Code coverage fails [276]

$
0
0
I have CS code and CS UTs, they run okey and pass all green. However, I cannot get the coverage because it fails using both, console and VS context menu option, with exactly the same error:

Error: TypeError: 'null' is not an object (evaluating 'banner.appendChild')

Files _Chutzpah.coverage.html and _Chutzpah.coverage.json are empty (3kb and 1kb).

I am using jasmine and this is my chutzpah.json file (I think it is ok)

```
{
"Framework": "jasmine",
"RootReferencePathMode":"SettingsFileDirectory",
"CodeCoverageIncludes": [
{ "Path": "./../app/*.coffee" }
],
"CodeCoverageExcludes": [
{ "Path": "./../app/*.js" }
],
"EnableCodeCoverage": "null",
"CoffeeScriptBareMode": "false",
"References": [
{ "Path": "./../jquery-1.11.1.min.js"},
{ "Path": "./../knockout-3.1.0.js" },
{ "Path": "./../app/config.coffee"},
{ "Path": "./../app/utils.coffee" },
{ "Path": "./../app/infra/mixer.coffee"},
{ "Path": "./../app/infra/event.aggregator.coffee"},
{ "Path": "./../app/infra/ajax.dispatcher.coffee" },
{ "Path": "./../app/webapi/webapi.client.coffee" },
{ "Path": "./../app/infra/aop.coffee" }
]
}

```

And this is what I get in VS Output window and after running it by command line:

```
------ Test started: File: C:\TAC\TarjetaNaranja.TerminalAutoconsulta.Web\Scripts\tests\infra\analytics.coffee ------
Error: TypeError: 'null' is not an object (evaluating 'banner.appendChild')
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine-html.js (line 137)
at dispatch in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 1566)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 1549)
at clearStack in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 506)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 1505)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 1517)
at attemptAsync in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 1523)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 1496)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 1485)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 518)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/jasmine/v2/jasmine.js (line 548)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/Coverage/blanket_jasmine_v2.js (line 5427)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/Coverage/blanket_jasmine_v2.js (line 4585)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/Coverage/blanket_jasmine_v2.js (line 4591)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/Coverage/blanket_jasmine_v2.js (line 4532)
in file:///C:/Users/lucas.ontivero/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/jlxhcl0d.yo1/TestFiles/Coverage/blanket_jasmine_v2.js (line 4592)
While Running:C:\TAC\TarjetaNaranja.TerminalAutoconsulta.Web\Scripts\tests\infra\analytics.coffee
------ Test started: File: C:\TAC\TarjetaNaranja.TerminalAutoconsulta.Web\Scripts\tests\infra\analytics.coffee ------
2 passed, 0 failed, 2 total (chutzpah).

========== Total Tests: 2 passed, 0 failed, 2 total ==========

```

If you need more info, please just let me know.
Thank you
Comments: Hi, Any news? Was the repro enough?

Viewing all articles
Browse latest Browse all 1864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>