/[projects]/misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/2_js/8549--string-sorting-nonstrings.js
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/2_js/8549--string-sorting-nonstrings.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Wed Mar 12 19:30:05 2014 UTC (10 years, 3 months ago) by torben
File MIME type: application/javascript
File size: 888 byte(s)
initial import
1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "8549 - string sorting non-string types" );
3
4 $(document).ready( function () {
5 var test = false;
6
7 $.fn.dataTable.ext.sErrMode = "throw";
8
9
10
11 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
12 * Shallow properties
13 */
14
15 $('#example').dataTable( {
16 "aaData": [
17 [ null ],
18 [ 5 ],
19 [ "1a" ],
20 [ new Date(0) ]
21 ],
22 "aoColumns": [
23 { "sTitle": "Test" }
24 ]
25 } );
26
27 oTest.fnTest(
28 "Sorting works - first cell is empty",
29 null,
30 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() === ""; }
31 );
32
33 oTest.fnTest(
34 "Second cell is 1a",
35 null,
36 function () { return $('#example tbody tr:eq(1) td:eq(0)').html() === "1a"; }
37 );
38
39 oTest.fnTest(
40 "Third cell is 5",
41 null,
42 function () { return $('#example tbody tr:eq(2) td:eq(0)').html() === "5"; }
43 );
44
45
46 oTest.fnComplete();
47 } );

  ViewVC Help
Powered by ViewVC 1.1.20