Skip to content

armgit / mocha

Public Imported from GitHub
0

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

globals

TJ Holowaychuk210e6e717046
diff --git a/index.md b/index.md
index 27a2c6da..c518d378 100644
--- a/index.md
+++ b/index.md
@@ -136,6 +136,14 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
--interfaces display available interfaces
--reporters display available reporters
+### --globals <names>
+
+ Accepts a comma-delimited list of accepted global variable names. For example suppose your app deliberately exposes a global named `app` and `YUI`, you may want to add `--globals app,YUI`.
+
+### --ignore-leaks
+
+ By default Mocha will fail when global variables are introduced, you may use `--globals` to specify a few, or use `--ignore-leaks` to disable this functionality.
+
### -r, --require <name>
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.