Skip to content

Commit

Permalink
Add table of contents and change list CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
jonvuri authored and tj committed Nov 16, 2012
1 parent 00e0924 commit 7c80ce2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
29 changes: 27 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,31 @@ Mocha is a feature-rich JavaScript test framework running on [node](http://nodej
- TextMate bundle
- and more!

<h2 id="table-of-contents">Table of contents</h2>

- [Installation](#installation)
- [1\. 2\. 3\. Mocha!](#getting-started)
- [Assertions](#assertions)
- [Synchronous code](#synchronous-code)
- [Asynchronous code](#asynchronous-code)
- [Pending tests](#pending-tests)
- [Exclusive tests](#exclusive-tests)
- [Inclusive tests](#inclusive-tests)
- [Test duration](#test-duration)
- [String diffs](#string-diffs)
- [mocha(1)](#usage)
- [Interfaces](#interfaces)
- [Reporters](#reporters)
- [Browser support](#browser-support)
- [mocha.opts](#mocha.opts)
- [Suite specific timeouts](#suite-specific-timeouts)
- [Test specific timeouts](#test-specific-timeouts)
- [Best practices](#best-practices)
- [Editors](#editors)
- [Example test suites](#example-test-suites)
- [Running mocha's tests](#running-mochas-tests)
- [More information](#more-information)

<h2 id="installation">Installation</h2>

Install with [npm](http://npmjs.org):
Expand Down Expand Up @@ -182,7 +207,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
Note that currently only one `.only()` call is respected, this
effectively turns into a `--grep`.

<h2 id="exclusive-tests">Inclusive tests</h2>
<h2 id="inclusive-tests">Inclusive tests</h2>

This feature is similar to `.only()`, however by appending `.skip()`
you may tell Mocha to simply ignore these suite(s) and test-case(s). This
Expand Down Expand Up @@ -217,7 +242,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal

![test duration](images/reporter-spec-duration.png)

<h2 id="string diffs">String diffs</h2>
<h2 id="string-diffs">String diffs</h2>

Mocha supports the `err.expected`, and `err.actual` properties
when available to present expectations to the developer. Currently
Expand Down
7 changes: 4 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ ul {
margin-top: 20px;
padding: 0 15px;
width: 100%;
column-count: 2;
-moz-column-count: 2;
-webkit-column-count: 2;
}

ul li {
float: left;
width: 40%;
margin-top: 5px;
margin-right: 60px;
list-style: none;
Expand Down Expand Up @@ -178,4 +179,4 @@ code .comment { color: #ddd }
code .init { color: #2F6FAD }
code .string { color: #5890AD }
code .keyword { color: #8A6343 }
code .number { color: #2F6FAD }
code .number { color: #2F6FAD }

0 comments on commit 7c80ce2

Please sign in to comment.