Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fix #267, document relative require

Daniel St. Jules4df3768b7aef
diff --git a/index.html b/index.html
index f8307d82..7e6f6c23 100644
--- a/index.html
+++ b/index.html
@@ -426,7 +426,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="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>
+<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>. Furthermore, it can be used with relative paths, e.g. <code>--require ./test/helper.js</code></p>
<h3 id="ui-option">-u, --ui &lt;name&gt;</h3>
diff --git a/index.md b/index.md
index 8455e147..d05beee3 100644
--- a/index.md
+++ b/index.md
@@ -387,7 +387,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](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')`.
+ 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')`. Furthermore, it can be used with relative paths, e.g. `--require ./test/helper.js`
<h3 id="ui-option">-u, --ui &lt;name&gt;</h3>