1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
7 src=
"http://code.jquery.com/jquery-latest.js"></script>
9 href=
"http://code.jquery.com/qunit/git/qunit.css"
10 type=
"text/css" media=
"screen" />
11 <script type=
"text/javascript"
12 src=
"http://code.jquery.com/qunit/git/qunit.js"></script>
14 <!-- Files to be tested. -->
16 src=
"ganeti_web/media/js/job_status.js"></script>
20 $(document
).ready(function() {
24 test("cap_first single word", 1, function() {
25 strictEqual(cap_first("test"), "Test");
28 test("cap_first multiple words", 1, function() {
29 strictEqual(cap_first("test string"), "Test String");
32 test("format_op no replacements", 1, function() {
33 strictEqual(format_op("OP_TEST", "Status"), "Test: Status");
36 test("format_op one replacement", 1, function() {
37 strictEqual(format_op("OP_TEST_STRING", "derps"),
38 "Test String: Derps");
45 <h1 id=
"qunit-header">GWM JS Tests
</h1>
46 <h2 id=
"qunit-banner"></h2>
47 <div id=
"qunit-testrunner-toolbar"></div>
48 <h2 id=
"qunit-userAgent"></h2>
49 <ol id=
"qunit-tests"></ol>
50 <div id=
"qunit-fixture"></div>