Now that we are here - Lets look at some interchangeable frameworks for JS testing and also see how we can translate the unit testing to an end to end testing
Example of JS unit testing framework - Used to test jQuery, JQuery UI and jQuery Mobile . QUnit can be used easily and also it can be used to test any generic js code itself . A Sample test is written below. You can use the cookbook to enhance your knowledge further
test(“a test example”, function(){
ok( true, “this test passes”);
var value = “hello"
equal (value, “hello”, “We expect value to be hello”);
});