QUnit sample Akiyah Follow 2011-09-15 12:47:19 License: MIT License Fork2 Fav2 View1358 Play Stop Reload Fullscreen Smart Phone Fork tree Readme JavaScript 29 lines HTML 8 lines CSS 0 lines QUnit sample QUnit jQuery v1.4.3 $(document).ready(function(){ test("a basic test example", function() { ok( true, "this test is fine" ); var value = "hello"; equals( "hello", value, "We expect value to be hello" ); }); module("Module A"); test("first test within module", function() { ok( true, "all pass" ); }); test("second test within module", function() { ok( true, "all pass" ); }); module("Module B"); test("some other test", function() { expect(2); equals( true, false, "failing test" ); equals( true, true, "passing test" ); }); }); <h1 id="qunit-header">QUnit example</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, will be hidden</div> QUnit sample QUnit $(document).ready(function(){ test("a basic test example", function() { ok( true, "this test is fine" ); var value = "hello"; equals( "hello", value, "We expect value to be hello" ); }); module("Module A"); test("first test within module", function() { ok( true, "all pass" ); }); test("second test within module", function() { ok( true, "all pass" ); }); module("Module B"); test("some other test", function() { expect(2); equals( true, false, "failing test" ); equals( true, true, "passing test" ); }); }); <h1 id="qunit-header">QUnit example</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, will be hidden</div> use an iframe compat browser, deer Play on jsdo.it games Share Embed QR Tag Download Complete! Description どんなゲームですか? Control Device スマートフォンコントローラー jsdo.it WebSocket Controller» マウス キーボード タッチデバイス Fullscreen 有効 無効 jsdo.it games から削除する Submit Tweet style Design view Code view code <script type="text/javascript" src="http://jsdo.it/blogparts/497D/js?view=design"></script><p class="ttlBpJsdoit" style="width: 465px; margin: 0; text-align: right; font-size: 11px;"><a href="http://jsdo.it/Akiyah/497D" title="QUnit sample">QUnit sample - jsdo.it - share JavaScript, HTML5 and CSS</a></p> QUnit sample Tweet twitter Tags QUnit sample Favorite by yd_niku cancer6: QUnit Forked sort new page view favorite forked forked: QUnit sample cancer6 01 1694views 85/8/1 QUnit sample forked: QUnit sample GeckoTang 00 1603views 50/12/1 QUnit sample 集合演算テスト eller86 00 245views 106/10/1 QUnit Underscore.random.js norahiko 01 588views 86/132/3 QUnit sample 1 2NEXT>>