Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Minor improvements

XhmikosRa1b1755d3b62
diff --git a/head.html b/head.html
index d7af1bc5..74cda875 100644
--- a/head.html
+++ b/head.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<head>
+ <meta charset="utf-8">
<title>Mocha - the fun, simple, flexible JavaScript test framework</title>
- <link rel="stylesheet" href="style.css" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="style.css">
<script src="jquery.js"></script>
<script src="highlight.js"></script>
<script>
@@ -14,5 +14,5 @@
</head>
<body>
<section id="content">
- <h1><a href="http://github.com/visionmedia/mocha">Mocha</a></h1>
+ <h1><a href="https://github.com/visionmedia/mocha">Mocha</a></h1>
<p id="tag"><em>simple</em>, <em>flexible</em>, <em>fun</em></p>
diff --git a/images/reporter-htmlcov.png b/images/reporter-htmlcov.png
new file mode 100644
index 00000000..5ddc94be
Binary files /dev/null and b/images/reporter-htmlcov.png differ
diff --git a/images/reporter-min.png b/images/reporter-min.png
new file mode 100644
index 00000000..f95118a1
Binary files /dev/null and b/images/reporter-min.png differ
diff --git a/images/reporter-nyan.png b/images/reporter-nyan.png
new file mode 100644
index 00000000..6f6fbb9f
Binary files /dev/null and b/images/reporter-nyan.png differ
diff --git a/images/reporter-string-diffs.png b/images/reporter-string-diffs.png
new file mode 100644
index 00000000..f71d1f9e
Binary files /dev/null and b/images/reporter-string-diffs.png differ
diff --git a/index.html b/index.html
index 488559f2..914d57ea 100644
--- a/index.html
+++ b/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<head>
+ <meta charset="utf-8">
<title>Mocha - the fun, simple, flexible JavaScript test framework</title>
- <link rel="stylesheet" href="style.css" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="style.css">
<script src="jquery.js"></script>
<script src="highlight.js"></script>
<script>
@@ -14,9 +14,9 @@
</head>
<body>
<section id="content">
- <h1><a href="http://github.com/visionmedia/mocha">Mocha</a></h1>
+ <h1><a href="https://github.com/visionmedia/mocha">Mocha</a></h1>
<p id="tag"><em>simple</em>, <em>flexible</em>, <em>fun</em></p>
-<p>Mocha is a feature-rich JavaScript test framework running on <a href="http://nodejs.org">node</a> and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on <a href="http://github.com/visionmedia/mocha">GitHub</a>.</p>
+<p>Mocha is a feature-rich JavaScript test framework running on <a href="http://nodejs.org">node.js</a> and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on <a href="https://github.com/visionmedia/mocha">GitHub</a>.</p>
<h2 id="features">Features</h2>
@@ -111,10 +111,10 @@ $ mocha
<h2 id="assertions">Assertions</h2>
-<p>Mocha allows you to use any assertion library you want, if it throws an error, it will work! This means you can utilize libraries such as <a href="http://github.com/visionmedia/should.js">should.js</a>, node's regular <code>assert</code> module, or others. The following is a list of known assertion libraries for node and/or the browser:</p>
+<p>Mocha allows you to use any assertion library you want, if it throws an error, it will work! This means you can utilize libraries such as <a href="https://github.com/visionmedia/should.js">should.js</a>, node's regular <code>assert</code> module, or others. The following is a list of known assertion libraries for node and/or the browser:</p>
<ul>
-<li><a href="http://github.com/visionmedia/should.js">should.js</a> BDD style shown throughout these docs</li>
+<li><a href="https://github.com/visionmedia/should.js">should.js</a> BDD style shown throughout these docs</li>
<li><a href="https://github.com/LearnBoost/expect.js">expect.js</a> expect() style assertions</li>
<li><a href="http://chaijs.com/">chai</a> expect(), assert() and should style assertions</li>
<li><a href="https://github.com/visionmedia/better-assert">better-assert</a> c-style self-documenting assert()</li>
@@ -282,7 +282,7 @@ $ mocha
Mocha provides string diffs, however in the future object diffs and
others may be provided.</p>
-<p><img src="http://f.cl.ly/items/3L0T1A0h2N1J3G021i0F/Screen%20Shot%202012-03-01%20at%202.31.31%20PM.png" alt="string diffs" title="" /></p>
+<p><img src="images/reporter-string-diffs.png" alt="string diffs" title="" /></p>
<h2 id="usage">mocha(1)</h2>
@@ -348,7 +348,7 @@ Options:
<h3 id="require-option">-r, --require &lt;name&gt;</h3>
-<p>The <code>--require</code> option is useful for libraries such as <a href="http://github.com/visionmedia/should.js">should.js</a>, so you may simply <code>--require should</code> instead of manually invoking <code>require('should')</code> within each test file. Note that this works well for <code>should</code> as it augments <code>Object.prototype</code>, however if you wish to access a module's exports you will have to require them, for example <code>var should = require('should')</code>.</p>
+<p>The <code>--require</code> option is useful for libraries such as <a href="https://github.com/visionmedia/should.js">should.js</a>, so you may simply <code>--require should</code> instead of manually invoking <code>require('should')</code> within each test file. Note that this works well for <code>should</code> as it augments <code>Object.prototype</code>, however if you wish to access a module's exports you will have to require them, for example <code>var should = require('should')</code>.</p>
<h3 id="ui-option">-u, --ui &lt;name&gt;</h3>
@@ -425,7 +425,7 @@ describe('app', function(){
<h3 id="exports-interface">Exports</h3>
-<p>The "<strong>exports</strong>" interface is much like Mocha's predecessor <a href="http://github.com/visionmedia/expresso">expresso</a>. The keys <code>before</code>, <code>after</code>, <code>beforeEach</code>, and <code>afterEach</code> are special-cased, object values
+<p>The "<strong>exports</strong>" interface is much like Mocha's predecessor <a href="https://github.com/visionmedia/expresso">expresso</a>. The keys <code>before</code>, <code>after</code>, <code>beforeEach</code>, and <code>afterEach</code> are special-cased, object values
are suites, and function values are test-cases.</p>
<pre><code>module.exports = {
@@ -498,7 +498,7 @@ test('#length', function(){
<p>The "nyan" reporter is exactly what you might expect:</p>
-<p><img src="http://f.cl.ly/items/3f1P1d2U1y1E0K1W1M0m/Screen%20Shot%202012-08-22%20at%203.59.08%20PM.png" alt="js nyan cat reporter" title="" /></p>
+<p><img src="images/reporter-nyan.png" alt="js nyan cat reporter" title="" /></p>
<h3 id="tap-reporter">TAP</h3>
@@ -551,7 +551,7 @@ test('#length', function(){
<p>Click to view the current <a href="coverage.html">Express test coverage</a> report. For an integration example view the mocha test coverage support <a href="https://github.com/visionmedia/express/commit/b6ee5fafd0d6c79cf7df5560cb324ebee4fe3a7f">commit</a> for Express.</p>
-<p><img src="http://f.cl.ly/items/3T3G1h1d3Z2i3M3Y1Y0Y/Screen%20Shot%202012-02-23%20at%208.37.13%20PM.png" alt="code coverage reporting" title="" /></p>
+<p><img src="images/reporter-htmlcov.png" alt="code coverage reporting" title="" /></p>
<h3 id="min-reporter">Min</h3>
@@ -559,7 +559,7 @@ test('#length', function(){
on failure. This reporter works great with <code>--watch</code> as it clears the terminal
in order to keep your test summary at the top.</p>
-<p><img src="http://f.cl.ly/items/460B2r3p3M3k2D3J250m/Screen%20Shot%202012-03-24%20at%2010.46.01%20AM.png" alt="" title="" /></p>
+<p><img src="images/reporter-min.png" alt="min reporter" title="" /></p>
<h3 id="doc-reporter">Doc</h3>
@@ -598,7 +598,7 @@ test('#length', function(){
&lt;/section&gt;
</code></pre>
-<p>The SuperAgent request library <a href="http://visionmedia.github.com/superagent/docs/test.html">test documentation</a> was generated with Mocha's doc reporter using this simple make target:</p>
+<p>The SuperAgent request library <a href="http://visionmedia.github.io/superagent/docs/test.html">test documentation</a> was generated with Mocha's doc reporter using this simple make target:</p>
<pre><code>test-docs:
make test REPORTER=doc \
diff --git a/index.md b/index.md
index c043f6b5..03b20ff4 100644
--- a/index.md
+++ b/index.md
@@ -1,4 +1,4 @@
-Mocha is a feature-rich JavaScript test framework running on [node](http://nodejs.org) and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on [GitHub](http://github.com/visionmedia/mocha).
+Mocha is a feature-rich JavaScript test framework running on [node.js](http://nodejs.org) and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on [GitHub](https://github.com/visionmedia/mocha).
<h2 id="features">Features</h2>
@@ -89,9 +89,9 @@ Mocha is a feature-rich JavaScript test framework running on [node](http://nodej
<h2 id="assertions">Assertions</h2>
-Mocha allows you to use any assertion library you want, if it throws an error, it will work! This means you can utilize libraries such as [should.js](http://github.com/visionmedia/should.js), node's regular `assert` module, or others. The following is a list of known assertion libraries for node and/or the browser:
+Mocha allows you to use any assertion library you want, if it throws an error, it will work! This means you can utilize libraries such as [should.js](https://github.com/visionmedia/should.js), node's regular `assert` module, or others. The following is a list of known assertion libraries for node and/or the browser:
- - [should.js](http://github.com/visionmedia/should.js) BDD style shown throughout these docs
+ - [should.js](https://github.com/visionmedia/should.js) BDD style shown throughout these docs
- [expect.js](https://github.com/LearnBoost/expect.js) expect() style assertions
- [chai](http://chaijs.com/) expect(), assert() and should style assertions
- [better-assert](https://github.com/visionmedia/better-assert) c-style self-documenting assert()
@@ -248,7 +248,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
Mocha provides string diffs, however in the future object diffs and
others may be provided.
- ![string diffs](http://f.cl.ly/items/3L0T1A0h2N1J3G021i0F/Screen%20Shot%202012-03-01%20at%202.31.31%20PM.png)
+ ![string diffs](images/reporter-string-diffs.png)
<h2 id="usage">mocha(1)</h2>
@@ -314,7 +314,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
<h3 id="require-option">-r, --require &lt;name&gt;</h3>
- The `--require` option is useful for libraries such as [should.js](http://github.com/visionmedia/should.js), so you may simply `--require should` instead of manually invoking `require('should')` within each test file. Note that this works well for `should` as it augments `Object.prototype`, however if you wish to access a module's exports you will have to require them, for example `var should = require('should')`.
+ The `--require` option is useful for libraries such as [should.js](https://github.com/visionmedia/should.js), so you may simply `--require should` instead of manually invoking `require('should')` within each test file. Note that this works well for `should` as it augments `Object.prototype`, however if you wish to access a module's exports you will have to require them, for example `var should = require('should')`.
<h3 id="ui-option">-u, --ui &lt;name&gt;</h3>
@@ -388,7 +388,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
<h3 id="exports-interface">Exports</h3>
- The "__exports__" interface is much like Mocha's predecessor [expresso](http://github.com/visionmedia/expresso). The keys `before`, `after`, `beforeEach`, and `afterEach` are special-cased, object values
+ The "__exports__" interface is much like Mocha's predecessor [expresso](https://github.com/visionmedia/expresso). The keys `before`, `after`, `beforeEach`, and `afterEach` are special-cased, object values
are suites, and function values are test-cases.
module.exports = {
@@ -459,7 +459,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
The "nyan" reporter is exactly what you might expect:
- ![js nyan cat reporter](http://f.cl.ly/items/3f1P1d2U1y1E0K1W1M0m/Screen%20Shot%202012-08-22%20at%203.59.08%20PM.png)
+ ![js nyan cat reporter](images/reporter-nyan.png)
<h3 id="tap-reporter">TAP</h3>
@@ -512,7 +512,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
Click to view the current [Express test coverage](coverage.html) report. For an integration example view the mcoha test coverage support [commit](https://github.com/visionmedia/express/commit/b6ee5fafd0d6c79cf7df5560cb324ebee4fe3a7f) for Express.
- ![code coverage reporting](http://f.cl.ly/items/3T3G1h1d3Z2i3M3Y1Y0Y/Screen%20Shot%202012-02-23%20at%208.37.13%20PM.png)
+ ![code coverage reporting](images/reporter-htmlcov.png)
<h3 id="min-reporter">Min</h3>
@@ -520,7 +520,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
on failure. This reporter works great with `--watch` as it clears the terminal
in order to keep your test summary at the top.
- ![](http://f.cl.ly/items/460B2r3p3M3k2D3J250m/Screen%20Shot%202012-03-24%20at%2010.46.01%20AM.png)
+ ![min reporter](images/reporter-min.png)
<h3 id="doc-reporter">Doc</h3>
@@ -557,7 +557,7 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
</dl>
</section>
- The SuperAgent request library [test documentation](http://visionmedia.github.com/superagent/docs/test.html) was generated with Mocha's doc reporter using this simple make target:
+ The SuperAgent request library [test documentation](http://visionmedia.github.io/superagent/docs/test.html) was generated with Mocha's doc reporter using this simple make target:
test-docs:
make test REPORTER=doc \
diff --git a/style.css b/style.css
index 08d41933..7dce3606 100644
--- a/style.css
+++ b/style.css
@@ -1,7 +1,7 @@
body {
font: 14px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 0;
- color: #2C2C2C;
+ color: #2c2c2c;
border-top: 2px solid #ddd;
}
@@ -14,7 +14,7 @@ h1 {
font-style: normal;
font-weight: 100;
text-transform: lowercase;
- background: #8A6343;
+ background: #8a6343;
color: white;
display: inline-block;
padding: 48px 30px;
@@ -29,7 +29,7 @@ h1 {
}
h1:hover {
- background: #A07A5C;
+ background: #a07a5c;
}
h1 a {
@@ -54,7 +54,7 @@ h2 {
#tag {
opacity: 0;
- color: #C29D7F;
+ color: #c29d7f;
font-weight: 100;
font-size: 30px;
margin-top: -110px;
@@ -82,7 +82,7 @@ h2 {
}
a {
- color: #8A6343;
+ color: #8a6343;
font-weight: bold;
text-decoration: none;
}
@@ -95,9 +95,12 @@ ul {
margin-top: 20px;
padding: 0 15px;
width: 100%;
- column-count: 2;
- -moz-column-count: 2;
-webkit-column-count: 2;
+ -moz-column-count: 2;
+ column-count: 2;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
}
ul li {
@@ -181,7 +184,7 @@ footer span {
}
code .comment { color: #ddd }
-code .init { color: #2F6FAD }
-code .string { color: #5890AD }
-code .keyword { color: #8A6343 }
-code .number { color: #2F6FAD }
+code .init { color: #2f6fad }
+code .string { color: #5890ad }
+code .keyword { color: #8a6343 }
+code .number { color: #2f6fad }