Skip to content

Commit 72c8780

Browse files
committed
add doc for test.html
1 parent a7b4d6d commit 72c8780

12 files changed

+24
-18
lines changed

doc/test.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ <h1>Unit Test</h1>
7070
<h2>Introduction</h2>
7171

7272
<p>
73-
JSX has a built-in test runner invoked by <code>--test</code> option and has a unit test framework <code>test-case.jsx</code>. The unit test framework is an xUnit style, running <code>_Test#test*():void</code> of the main file.
73+
JSX has a built-in test runner invoked by <code>--test</code> option and has an unit test framework <code>test-case.jsx</code>. The unit test framework is an xUnit style, running <code>_Test#test*():void</code> of the given file.
7474
</p>
7575
<p>
76-
Here is a basic test file, which is typically placed in <code>t/</code> of a project.
76+
Here is a simple test file, which is typically placed in <code>t/</code> of a project.
7777
</p>
7878

7979
<pre class="prettyprint"><code class="language-jsx">import &quot;test-case.jsx&quot;;
@@ -98,7 +98,6 @@ <h2>Introduction</h2>
9898

9999
<p>NOTE: it is recommended to use prove(1) to run tests and parse TAP, which can run test files in parallel. See .proverc and and Makefile in the <a href="https://github.com/jsx/mizuki">mizuki</a> project.</p>
100100

101-
102101
<h2>Synchronous Test</h2>
103102

104103
<p>Synchronous testing is really simple, where you just define test methods, which are invoked in serial.</p>
@@ -142,11 +141,15 @@ <h2>Asynchronous Test</h2>
142141

143142
async.done(); // to tell this test is finished
144143
}, to);
145-
}, 1000);
144+
}, 1000 /* timeout in milliseconds */);
146145
}
147146
}
148147
</code></pre>
149148

149+
<h2>Misc.</h2>
150+
151+
<p>jsx --test can takes test method names to run specific tests in a file. When you use <a href="https://github.com/jsx/jsx.vim">jsx.vim</a> you can run the currently editing test method by <code>\t</code>.</p>
152+
150153
<h2>See Also</h2>
151154

152155
<ul>

gen/src/doc/test.mt

+7-4
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
<title>Unit Test - JSX</title>
99

1010
?= $_mt->render_file("header.mt")
11-
?= $_mt->render_file("breadcrumb.mt", [ qw(Documents doc.html) ], [ 'Unit Test' ])
11+
?= $_mt->render_file("breadcrumb.mt", [ qw(Documents doc.html compilerref.html) ], [ 'Unit Test' ])
1212
<div id="main">
1313

1414
<h1>Unit Test</h1>
1515

1616
<h2>Introduction</h2>
1717

1818
<p>
19-
JSX has a built-in test runner invoked by <code>--test</code> option and has a unit test framework <code>test-case.jsx</code>. The unit test framework is an xUnit style, running <code>_Test#test*():void</code> of the main file.
19+
JSX has a built-in test runner invoked by <code>--test</code> option and has an unit test framework <code>test-case.jsx</code>. The unit test framework is an xUnit style, running <code>_Test#test*():void</code> of the given file.
2020
</p>
2121
<p>
22-
Here is a basic test file, which is typically placed in <code>t/</code> of a project.
22+
Here is a simple test file, which is typically placed in <code>t/</code> of a project.
2323
</p>
2424

2525
<?= $context->{prettify}->('jsx', <<'EOT')
@@ -46,7 +46,6 @@ ok 1 - testAdd
4646

4747
<p>NOTE: it is recommended to use prove(1) to run tests and parse TAP, which can run test files in parallel. See .proverc and and Makefile in the <a href="https://github.com/jsx/mizuki">mizuki</a> project.</p>
4848

49-
5049
<h2>Synchronous Test</h2>
5150

5251
<p>Synchronous testing is really simple, where you just define test methods, which are invoked in serial.</p>
@@ -99,6 +98,10 @@ class _Test extends TestCase {
9998
EOT
10099
?>
101100

101+
<h2>Misc.</h2>
102+
103+
<p>jsx --test can takes test method names to run specific tests in a file. When you use <a href="https://github.com/jsx/jsx.vim">jsx.vim</a> you can run the currently editing test method by <code>\t</code>.</p>
104+
102105
<h2>See Also</h2>
103106

104107
<ul>

jsxdoc/lib/built-in.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3562,7 +3562,7 @@ <h3>
35623562
<div id="footer">
35633563
<p>Copyright &copy; DeNA., Co., Ltd.</p>
35643564
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
3565-
at 2013-12-15T08:10:52.840Z.</p>
3565+
at 2013-12-15T08:23:30.184Z.</p>
35663566

35673567
</div>
35683568
</div>

jsxdoc/lib/common/test-case.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ <h3>
368368
<p>This is <strong>lib/common/test-case.jsx version 1.0.0</strong>.</p>
369369
<p>Copyright &copy; DeNA., Co., Ltd.</p>
370370
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
371-
at 2013-12-15T08:10:53.213Z.</p>
371+
at 2013-12-15T08:23:30.553Z.</p>
372372

373373
</div>
374374
</div>

jsxdoc/lib/js/console.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h3>
111111
<div id="footer">
112112
<p>Copyright &copy; DeNA, Co., Ltd.</p>
113113
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
114-
at 2013-12-15T08:10:53.494Z.</p>
114+
at 2013-12-15T08:23:30.832Z.</p>
115115

116116
</div>
117117
</div>

jsxdoc/lib/js/js.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h3>
8484
<div id="footer">
8585
<p>Copyright &copy; DeNA., Co., Ltd.</p>
8686
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
87-
at 2013-12-15T08:10:55.588Z.</p>
87+
at 2013-12-15T08:23:32.861Z.</p>
8888

8989
</div>
9090
</div>

jsxdoc/lib/js/js/nodejs.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ <h3>
13191319

13201320
<div id="footer">
13211321
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
1322-
at 2013-12-15T08:10:53.849Z.</p>
1322+
at 2013-12-15T08:23:31.158Z.</p>
13231323

13241324
</div>
13251325
</div>

jsxdoc/lib/js/js/phantomjs.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ <h3>
779779

780780
<div id="footer">
781781
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
782-
at 2013-12-15T08:10:54.553Z.</p>
782+
at 2013-12-15T08:23:31.844Z.</p>
783783

784784
</div>
785785
</div>

jsxdoc/lib/js/js/phantomjs/test-case.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h3>
5353

5454
<div id="footer">
5555
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
56-
at 2013-12-15T08:10:54.239Z.</p>
56+
at 2013-12-15T08:23:31.531Z.</p>
5757

5858
</div>
5959
</div>

jsxdoc/lib/js/js/web.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31642,7 +31642,7 @@ <h3>
3164231642
<div id="footer">
3164331643
<p>Copyright &copy; DeNA, Co., Ltd.</p>
3164431644
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
31645-
at 2013-12-15T08:10:55.300Z.</p>
31645+
at 2013-12-15T08:23:32.569Z.</p>
3164631646

3164731647
</div>
3164831648
</div>

jsxdoc/lib/js/timer.jsx.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ <h2>final class <strong>TimerHandle</strong></h2>
104104
<div id="footer">
105105
<p>Copyright &copy; DeNA, Co., Ltd.</p>
106106
<p class="jsxdoc-notice">This document was automatically generated by <a href="http://jsx.github.io/">JSX</a> 0.9.71<br />
107-
at 2013-12-15T08:10:55.901Z.</p>
107+
at 2013-12-15T08:23:33.237Z.</p>
108108

109109
</div>
110110
</div>

search/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)