This link has been bookmarked by 221 people . It was first bookmarked on 27 May 2008, by someone privately.
-
23 Oct 15
-
09 Jul 12
-
06 Jul 12
-
21 Jun 12
-
20 Jun 12
-
11 Jun 12
-
Assertions:
Name Type ok( state, message ) A boolean assertion, equivalent to JUnit's assertTrue. Passes if the first argument is truthy. equal( actual, expected, message ) A comparison assertion, equivalent to JUnit's assertEquals. notEqual( actual, expected, message ) A comparison assertion, equivalent to JUnit's assertNotEquals. deepEqual( actual, expected, message ) A deep recursive comparison assertion, working on primitive types, arrays and objects. notDeepEqual( actual, expected, message ) A deep recursive comparison assertion, working on primitive types, arrays and objects, with the result inverted, passing when some property isn't equal. strictEqual( actual, expected, message ) A stricter comparison assertion then equal. notStrictEqual( actual, expected, message ) A stricter comparison assertion then notEqual. raises( block, expected, message ) Assertion to test if a callback throws an exception when run. -
Integration into Browser Automation Tools
To integrate QUnit into browser automation tools, those doing the work of launching various browsers and gathering the results, QUnit provides a simple microformat for its test result.
<p id="qunit-testresult" class="result"> Tests completed in 221 milliseconds.<br/> <span class="passed">232</span> tests of <span class="total">232</span> passed, <span class="failed">0</span> failed. </p>
-
-
05 Jun 12
-
31 May 12
-
27 May 12
-
15 May 12
-
26 Apr 12
-
20 Mar 12
-
14 Mar 12
-
05 Mar 12
-
22 Feb 12
-
14 Feb 12
-
09 Feb 12
-
01 Feb 12
-
19 Jan 12
Samuel VianaWouldn't you agree that it's possible to write Jquery unitary tests !? Now it's possible !
test-casing testing development unittest javascript jquery delicious
-
12 Jan 12
-
21 Dec 11
-
15 Dec 11
-
12 Dec 11
-
11 Dec 11
-
25 Nov 11
-
16 Nov 11
-
11 Nov 11
-
11 Oct 11
-
01 Oct 11
-
15 Sep 11
-
31 Aug 11
-
22 Aug 11
-
17 Jul 11
-
03 Jul 11
-
27 Jun 11
-
test suite
-
any generic JavaScript
-
server-side
-
regression
-
refactoring
-
like JUnit
-
stop/start
-
-
02 Jun 11
Micah ElliottQUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript code (and even capable of testing JavaScript code on the server-side).
QUnit is especia -
21 May 11
-
20 May 11
laugharne.me ...QUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript code (and even capable of testing JavaScript code on the server-side).
QUnit is especially useful for regression testing: Whenever a bug is reported, write a test that asserts the existence of that particular bug. Then fix it and commit both. Every time you work on the code again, run the tests. If the bug comes up again - a regression - you'll spot it immediately and know how to fix it, because you know what code you just changed. -
14 May 11
-
27 Apr 11
-
06 Apr 11
-
22 Mar 11
-
19 Feb 11
-
01 Feb 11
-
24 Jan 11
-
06 Jan 11
-
-
-
<link rel="stylesheet" href="http://github.com/jquery/qunit/raw/master/qunit/qunit.css" type="text/css" media="screen" /> <script type="text/javascript" src="http://github.com/jquery/qunit/raw/master/qunit/qunit.js"></script>
-
<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-header element should contain the name of the testsuite
-
#qunit-banner element will set to show up as red if a test failed, green if all tests passed.
-
#qunit-userAgent elements is set to display the navigator.userAgent
-
#qunit-tests element will be used as a container for the test results.
-
#qunit-fixture element can be used to provide and manipulate test markup, and will be automatically reset after each test
-
test( name, expected, test ) Add a test to run. -
module( name, lifecycle ) Separate tests into modules. -
Assertions:
Name Type ok( state, message ) A boolean assertion, equivalent to JUnit's assertTrue. Passes if the first argument is truthy. equal( actual, expected, message ) A comparison assertion, equivalent to JUnit's assertEquals. notEqual( actual, expected, message ) A comparison assertion, equivalent to JUnit's assertNotEquals. deepEqual( actual, expected, message ) A deep recursive comparison assertion, working on primitive types, arrays and objects. notDeepEqual( actual, expected, message ) A deep recursive comparison assertion, working on primitive types, arrays and objects, with the result inverted, passing when some property isn't equal. strictEqual( actual, expected, message ) A stricter comparison assertion then equal. notStrictEqual( actual, expected, message ) A stricter comparison assertion then notEqual. raises( state, message ) Assertion to test if a callback throws an exception when run. -
double click on a test to have QUnit only run that single test.
-
add the name of a module to the URL to run only tests within that module
-
Add ?noglobals to the URL, and QUnit will detect if a test introduced a new global variable
-
-
03 Jan 11
-
17 Nov 10
-
start( )
-
start( )
-
test( name, expected, test )
-
expect( amount )
-
asyncTest( name, expected, test )
-
module( name, lifecycle )
-
ok( state, message )
-
equal( actual, expected, message )
-
deepEqual( actual, expected, message )
-
strictEqual( actual, expected, message )
-
notStrictEqual( actual, expected, message )
-
start( )
-
raises( block, expected, message )
-
stop( timeout )
-
start( decrement )
-
to run only tests within that module
-
eg. ?effects&ajax to run effects and ajax tests.
-
global-variables pollution detection. Add ?noglobals to the URL
-
-
10 Nov 10
-
08 Oct 10
-
14 Sep 10
-
13 Sep 10
-
27 Aug 10
-
11 Aug 10
-
06 Aug 10
-
27 Jul 10
Ralf HafnerQUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript code (and even capable of testing JavaScript code on the server-side).
-
21 Jul 10
-
20 Jul 10
-
14 Jul 10
-
05 Jul 10
-
29 Jun 10
-
05 Jun 10
-
14 May 10
-
13 May 10
-
06 May 10
-
13 Apr 10
-
11 Apr 10
-
01 Apr 10
-
29 Mar 10
-
19 Mar 10
-
19 Feb 10
-
15 Feb 10
-
13 Feb 10
-
06 Feb 10
-
05 Feb 10
-
04 Feb 10
-
02 Feb 10
Karsten FroehlichQUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript code (and even capable of testing JavaScript code on the server-side).
-
27 Jan 10
-
15 Jan 10
-
12 Jan 10
-
07 Dec 09
-
04 Dec 09
-
24 Nov 09
-
18 Nov 09
-
08 Nov 09
-
07 Nov 09
-
29 Oct 09
-
14 Oct 09
-
12 Oct 09
-
08 Oct 09
-
05 Oct 09
-
Luca Pallia powerful, easy-to-use, JavaScript test suite
development javascript ajax jquery test framework testing unit delicious
-
04 Oct 09
-
03 Oct 09
-
02 Oct 09
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.