-
Notifications
You must be signed in to change notification settings - Fork 32
/
view-me-to-run-js-tests.html
52 lines (43 loc) · 1.65 KB
/
view-me-to-run-js-tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script
src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet"
href="http://code.jquery.com/qunit/git/qunit.css"
type="text/css" media="screen" />
<script type="text/javascript"
src="http://code.jquery.com/qunit/git/qunit.js"></script>
<!-- Files to be tested. -->
<script
src="ganeti_web/media/js/job_status.js"></script>
<!-- Tests. -->
<script>
$(document).ready(function() {
module("job_status");
test("cap_first single word", 1, function() {
strictEqual(cap_first("test"), "Test");
});
test("cap_first multiple words", 1, function() {
strictEqual(cap_first("test string"), "Test String");
});
test("format_op no replacements", 1, function() {
strictEqual(format_op("OP_TEST", "Status"), "Test: Status");
});
test("format_op one replacement", 1, function() {
strictEqual(format_op("OP_TEST_STRING", "derps"),
"Test String: Derps");
});
});
</script>
</head>
<body>
<h1 id="qunit-header">GWM JS Tests</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"></div>
</body>
</html>