Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
updates to getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Remeika committed Jun 21, 2011
1 parent c22046c commit 54b4e6e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions site/www/src/documents/get-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,49 @@ <h1>Getting Started</h1>
<p>Then follow these steps to run tests...</p>

<ul class="index">
<li><a href="">in nodejs</a></li>
<li><a href="">in the browser</a></li>
<li><a href="">on code that is shared between the client and the server</a>
<li><a href="#node">in nodejs</a></li>
<li><a href="#browser">in the browser</a></li>
<li><a href="#shared">on code that is shared between the client and the server</a>
</ul>


<a name="node"></a>
<h3>In nodejs</h3>

<p>
Generate a sample suite in the spec directory:
<pre class="code">$ foounit generate --type=node spec</pre>
<pre class="code">$ foounit generate --target=node --dir=spec</pre>
</p>

<p>
Run the test:
<pre class="code">$ node spec/example_spec.js</pre>
<pre class="code">$ node spec/suite.js</pre>
</p>

<a name="browser"></a>
<h3>In the browser</h3>

<p>
Generate a sample suite in the spec directory:
<pre class="code">$ foounit generate --type=browser spec</pre>
<pre class="code">$ foounit generate --target=browser --dir=spec</pre>
</p>

<p>
Start a web server in the directory where the suite was created:
<pre class="code">$ foounit-server --spec=spec</pre>
<pre class="code">$ foounit serve</pre>
<p>

<p>
Open a web browser at <a href="">http://localhost:5057/spec/suite.html</a>
Open a web browser at <a href="">http://localhost:5057/spec/runner.html</a>
</p>


<a name="shared"></a>
<h3>Shared client and server code</h3>

<p>
Generate a sample suite in the spec directory:
<pre class="code">$ foounit generate --type=browser,node spec</pre>
<pre class="code">$ foounit generate --target=browser,node --dir=spec</pre>
<i>foounit is smart enough to know that when multiple environments are specified that it should create a shared directory for multi-environment testing</i>
</p>

Expand Down

0 comments on commit 54b4e6e

Please sign in to comment.