Debian Codegraph @

test/reorderError2.html

raw
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="UTF-8">
5 <title>QUnit - Asserts it does not skip tests after reordering</title>
6 <link rel="stylesheet" href="../dist/qunit.css">
7 <script src="../dist/qunit.js"></script>
8 <script>
9
10 // Ref #907
11 // Second Case.
12 // 1. First test failed in first module.
13 // 2. First test failed in second module.
14 // 3. Test count should be 2.
15 if ( window.sessionStorage ) {
16 var totalCount = 0;
17 sessionStorage[ "qunit-test-First fail module-2-should be fail" ] = 1;
18 sessionStorage[ "qunit-test-Second fail module-2-should be fail" ] = 1;
19 QUnit.done( function( details ) {
20 totalCount = details.failed;
21 delete sessionStorage[ "qunit-test-First fail module-2-should be fail" ];
22 delete sessionStorage[ "qunit-test-Second fail module-2-should be fail" ];
23 } );
24
25 QUnit.module( "First fail module-2" );
26 QUnit.test( "should be fail", function( assert ) {
27 assert.ok( false );
28 } );
29
30 QUnit.module( "Second fail module-2" );
31 QUnit.test( "should be fail", function( assert ) {
32 assert.ok( false );
33 } );
34 }
35 </script>
36
37 <!--
38 The actual tests will run after reloading QUnit and will catch the value
39 of the global `totalCount` set on the previous QUnit.done.
40 This new QUnit load could be replaced by an async call, but the grunt qunit
41 relies on QUnit loaded below and ignores the previously failed results.
42 -->
43 <script src="../dist/qunit.js"></script>
44 <script src="reorderError2.js"></script>
45 </head>
46 <body>
47 <div id="qunit"></div>
48 </body>
49 </html>