Skip to content

armgit / mocha

Public Imported from GitHub
0

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

docs

Tj Holowaychukffe675e8d779
diff --git a/index.html b/index.html
index 778dd260..22217f2b 100644
--- a/index.html
+++ b/index.html
@@ -4,12 +4,10 @@
<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" />
- <script src="jquery.js"></script>
- <script src="highlight.js"></script>
<script>
- $(function(){
- $('body').addClass('onload');
- })
+ onload = function(){
+ document.body.setAttribute('class', 'onload');
+ };
</script>
</head>
<body>
@@ -167,6 +165,14 @@ Options:
<p> The <code>--reporter</code> option allows you to specify the reporter that will be used, defaulting to &ldquo;dot&rdquo;.</p>
+<h3>-t, &mdash;timeout &lt;ms&gt;</h3>
+
+<p> Specifies the test-case timeout, defaulting to 2 seconds. To override you may pass the timeout in milliseconds, or a value with the <code>s</code> suffix, ex: <code>--timeout 2s</code> or <code>--timeout 2000</code> would be equivalent.</p>
+
+<h3>-s, &mdash;slow &lt;ms&gt;</h3>
+
+<p> Specify the &ldquo;slow&rdquo; test threshold, defaulting to 75ms. Mocha uses this to highlight test-cases that are taking too long.</p>
+
<h3>-g, &mdash;grep &lt;pattern&gt;</h3>
<p> The <code>--grep</code> option when specified will trigger mocha to only run tests matching the given <code>pattern</code> which is internally compiled to a <code>RegExp</code>.</p>
diff --git a/index.md b/index.md
index 01d0c332..5aa6c9d6 100644
--- a/index.md
+++ b/index.md
@@ -139,6 +139,14 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
### -R, --reporter &lt;name&gt;
The `--reporter` option allows you to specify the reporter that will be used, defaulting to "dot".
+
+### -t, --timeout &lt;ms&gt;
+
+ Specifies the test-case timeout, defaulting to 2 seconds. To override you may pass the timeout in milliseconds, or a value with the `s` suffix, ex: `--timeout 2s` or `--timeout 2000` would be equivalent.
+
+### -s, --slow &lt;ms&gt;
+
+ Specify the "slow" test threshold, defaulting to 75ms. Mocha uses this to highlight test-cases that are taking too long.
### -g, --grep &lt;pattern&gt;