jscriptunit

Created: 2012-03-22 03:33
Updated: 2017-03-25 08:09

README.md

#Summary unit testing framework for JScript

#Example ##TestCase(date_test.js) TestCase("Date Test", { setUp: function() { this.dt = new Date(2011, 2, 22, 15, 25, 28, 3); }, testGetFormattedDate: function() { assertEquals("2011/03/22 15:25:28", this.dt.getFormattedDate()); }, testGetYYYYMMDD: function() { assertEquals("20110322", this.dt.getYYYYMMDD()); }, testGetYYYYMMDDHH24MISS: function() { assertEquals("20110322152528", this.dt.getYYYYMMDDHH24MISS()); } });

##TestScript(runtest.wsf) <script language="JScript" src="mado.js"></script> <script language="JScript" src="jscriptunit.js"></script> <script language="JScript" src="date_test.js"></script>

##Run TestScript >cscript //NoLogo runtest.wsf OK: testGetFormattedDate OK: testGetYYYYMMDD OK: testGetYYYYMMDDHH24MISS OK: 3 tests, 0 failures

>
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more