Given below program is to test the script :
For explanation of QUnit methods click here.
Description of the CSS class used in html tags :
The #qunit-header element should contain the name of the testsuite, and won't
be modified by QUnit. The #qunit-banner element will set to show up as red if a
test failed, green if all tests passed. The #qunit-userAgent elements is set to
display the navigator.userAgent property. The #qunit-tests element will be used
as a container for the test results.
The #qunit-fixture element can be used to provide and manipulate test markup, and will be automatically reset after each test.
Learn from experts! Attend jQuery Training classes.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial