How to find out Code Coverage by using Blanket.js - code-coverage

How to find out Code Coverage by using Blanket.js.
In our MVC project I have added Javascript files in this hierarchy:
<script src="qunit.js" type="text/javascript"></script>
<script src="blanket.min.js" type="text/javascript"></script>
But in Code Coverage percantage it's reflecting (NaN %). Can anyone please assist me to fix this issue.

Related

ASP.net MVC and Angular 4 - Zone already loaded

Application Background: My application is built up using ASP.net MVC(.net framework 4.6) and several Angular 4 mini SPAs
Shared view _Layout.cshtml have one mini SPA to show shopping basket contents and it is referenced using:
<script src="~/apps/shopping/inline.2785c74270c160e8df55.bundle.js"></script>
<script src="~/apps/shopping/polyfills.35726d60cdf25fecc5f1.bundle.js"></script>
<script src="~/apps/shopping/vendor.4918fe9ed7ea45b90ec8.bundle.js"></script>
<script src="~/apps/shopping/main.4d6729c54eca7c31dbba.bundle.js"></script>
Another view Order.cshtml have another SPA and it is referenced using:
#section scripts{
<script src="~/apps/userorder/inline.2a63d25fd80947ce8bb4.bundle.js"></script>
<script src="~/apps/userorder/polyfills.35726d60cdf25fecc5f1.bundle.js"></script>
<script src="~/apps/userorder/vendor.ec246c0701440a3e2ce3.bundle.js"></script>
<script src="~/apps/userorder/main.46be1befa8a20148f402.bundle.js"></script>}
Error
All looks good when I am at home view because on that page only 1 SPA is loaded
When I go to order view, I see below error in console window because now 2 SPAs have been loaded but still it works functionally.
I have already tried this and this
I am using Angular 4 with Angular CLI. Could anyone help me to get past this error, please?
I commented out import statement for zone in polyfill.ts and it worked like a charm.

Openlayers 3 debug

Currently, I am using the compiled version through this link:
But when something goes wrong, it is not possible to debug, because the library is minimized.
Is there a way to link to some file which contains the full source code?
Some weeks ago, I used to us ol-whitespace.js, but now I can't find it anywhere.
Just to clarify Christophe's answer, the OpenLayers Quick Start guide points you to the following minified file:
<script src="http://openlayers.org/en/v3.0.0/build/ol.js" type="text/javascript"></script>
You can replace this with:
<script src="http://openlayers.org/en/v3.0.0/build/ol-debug.js" type="text/javascript"></script>
I do not see your link but this file is now called ol-debug.js.
You can find it next to ol.js in the build folder.

how to use jquery ui full files rather minified versions?

I have implemented datepicker following "jQuery getting started", using 3 files:
<link type="text/css" href="css/themename/jquery-ui-1.8.22.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>
It suggests to use 3 files including "jquery-1.4.4.min.js". What if I want to use full .js file e.g "jquery.ui.datepicker.js" for datepicker. Reason of asking to use full version is to modify some elements for my need which is difficult in minified version.
Then download and reference the unminified version.
There is no difference aside from the size of the files. You can always re-minify once you've completed your changes.
If you're doing a custom build, the non minified version of jquery.ui.datepicker will be in in the development-bundle/ui folder.

asp.net mvc 3 unobtrusive client side validation not working in ie

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"
type="text/javascript"></script>
<script src="//ajax.aspnetcdn.com/ajax/jQuery.Validate/1.7/jQuery.Validate.min.js"
type="text/javascript"></script>
<script src="//ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js"
type="text/javascript"></script>
I am using data annotations to display the error message. In Firefox its working fine, but in IE its not displaying the error message in the client side.
from the below link JQuery 1.6 $('form').validate() not working in IE7 & IE8, I came to see that
Jquery Validate does not currently work with jQuery 1.6 in IE6, IE7,
and IE8.
I am using jquery UI autocomplete,Datepicker in my project. So if i change the jquery version from 1.6.2 to jquery 1.5.2 my validation works fine, but my autocomplete starts failing.
how to solve this? any thoughts?
jQuery.validate 1.8.1 is release for 2001 may to be resolve this problem for ie, I integrated with my MVC 3 project with client side validation and it works perfect for me.

jquery not working in asp.net mvc after publishing to server

I've built an mvc application which contains some jquery code. When I run the app from my ide, everything works perfectly. When I publish to the server and open the page, the jquery does not work. I get object expected errors.
Could this be due to my file mappings? here is a sample of my mapping in the app -
<script type="text/javascript" href="../../Scripts/jquery-1.3.2.js"></script>
I published the app to iis7 successfully, but the jquery is broken. I did publish to an application within an existing web site.
Any thoughts?
You may be experiencing problems with your relative path.
You can try this, which is a path from the application root:
<script type="text/javascript" href="/Scripts/jquery-1.3.2.js"></script>
Or this C# solution:
<script src="<%= Url.Content("~/Scripts/jquery-1.3.2.js") %>" type="text/javascript"></script>

Resources