QUnit TTD work for $.fn.isWeekend()
QUnit Tests for $.fn.isWeekend() jQuery Plugin
by pixelhandler
HTML
<link rel="stylesheet" href="https://github.com/jquery/qunit/raw/master/qunit/qunit.css">
<script src="https://github.com/jquery/qunit/raw/master/qunit/qunit.js"></script>
<h1 id="qunit-header">QUnit Tests for $.fn.isWeekend() jQuery Plugin</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup</div>
JavaScript
/**
* $.fn.isWeekend() plugin to test if browsing on Sat./Sun.
* checks a date object to see if the day is a weekend day, Saturday / Sunday
* requires Date object as argument and jQuery
* dr.isWeekend alias for plugin to use as utility function
* @return true/false
*/
// documentation on writing tests here: http://docs.jquery.com/QUnit
// source : https://github.com/jquery/qunit
/*
* dr.isWeekend() check to see if a date oject is a weekend day, Saturday / Sunday
*
* TEST...
* is dr a global variable.
* dr.isWeekend() expects argument of object type Date
* dr.isWeekend() plugin returns true or false for each day of the week
*/