Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fix #1239 to be included when index.html is made

Travis Jeffery2ecef5ab020c
diff --git a/index.html b/index.html
index 13051b8d..d270f3a0 100644
--- a/index.html
+++ b/index.html
@@ -501,12 +501,9 @@ test('#length', function(){
<p>The <code>require</code> interface allows you to require the <code>describe</code> and friend words
directly using <code>require</code> and call them whatever you want. This interface
is also useful if you want to avoid global variables in your tests.</p>
-<p>
- <i>Note:</i> this only works if
- you execute your file via <code>mocha</code>, instead of using <code>node</code> directly. The reason
- that you can't use node directly to run your script is that certain mocha methods are exposed
- at runtime and only when using the <code>mocha</code> binary.
-</p>
+
+<p>Note this works when you run your tests via the <code>mocha</code> executable only, and not when using the <code>node</code> executable directly. The reason is that
+ certain methods are exposed at runtime and when using the <code>mocha</code> executable only.</p>
<pre><code>var testCase = require('mocha').describe
var pre = require('mocha').before
diff --git a/index.md b/index.md
index d045365b..bc9a1eaf 100644
--- a/index.md
+++ b/index.md
@@ -452,10 +452,13 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
<h3 id="require-interface">Require</h3>
-The `require` interface allows you to require the `describe` and friend words
+ The `require` interface allows you to require the `describe` and friend words
directly using `require` and call them whatever you want. This interface
is also useful if you want to avoid global variables in your tests.
+ Note this works when you run your tests via the `mocha` executable only, and not when using the `node` executable directly. The reason is that
+ certain methods are exposed at runtime and when using the `mocha` executable only.
+
var testCase = require('mocha').describe
var pre = require('mocha').before
var assertions = require('mocha').assertions