单元测试(qunit)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>单元测试 </title> <meta name="description" content=""> <meta name="keywords" content=""> <link href="http://code.jquery.com/qunit/qunit-1.11.0.css" rel="stylesheet"> </head> <body> <div id="qunit"></div> <div id="qunit-fixture"></div> </body> <link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.11.0.css" /> <script src="http://code.jquery.com/qunit/qunit-1.11.0.js"></script> <script type="text/javascript"> QUnit.test( "hello test", function( assert ) { assert.ok( "hello world" != "hello world", "Test hello wordl" ); }); </script> </html>