Debian Codegraph @

test/reorderError1.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 // First Case.
12 // 1. First test failed and second test passed in first module.
13 // 2. First test failed in second module.
14 // 3. Test count should be 3.
15 if ( window.sessionStorage ) {
16 var totalCount = 0;
17 sessionStorage[ "qunit-test-First fail module-1-should be fail" ] = 1;
18 sessionStorage[ "qunit-test-Second fail module-1-should be fail" ] = 1;
19 QUnit.done( function( details ) {
20 totalCount = details.total;
21 delete sessionStorage[ "qunit-test-First fail module-1-should be fail" ];
22 delete sessionStorage[ "qunit-test-Second fail module-1-should be fail" ];
23 } );
24
25 QUnit.module( "First fail module-1" );
26 QUnit.test( "should pass", function( assert ) {
27 assert.ok( true )
28 } );
29 QUnit.test( "should be fail", function( assert ) {
30 assert.ok( false );
31 } );
32
33 QUnit.module( "Second fail module-1" );
34 QUnit.test( "should be fail", function( assert ) {
35 assert.ok( false );
36 } );
37 }
38 </script>
39
40 <!--
41 The actual tests will run after reloading QUnit and will catch the value
42 of the global `totalCount` set on the previous QUnit.done.
43 This new QUnit load could be replaced by an async call, but the grunt qunit
44 relies on QUnit loaded below and ignores the previously failed results.
45 -->
46 <script src="../dist/qunit.js"></script>
47 <script src="reorderError1.js"></script>
48 </head>
49 <body>
50 <div id="qunit"></div>
51 </body>
52 </html>