Skip to content

armgit / mocha

Public Imported from GitHub
0

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

docs

TJ Holowaychuk007bb5ae942c
diff --git a/index.html b/index.html
index 628024d9..c55ad160 100644
--- a/index.html
+++ b/index.html
@@ -660,29 +660,23 @@ test('#length', function(){
<meta charset="utf-8">
<title>Mocha Tests</title>
<link rel="stylesheet" href="mocha.css" />
+</head>
+<body>
+ <div id="mocha"></div>
<script src="jquery.js"></script>
<script src="expect.js"></script>
<script src="mocha.js"></script>
<script>mocha.setup('bdd')</script>
<script src="test.array.js"></script>
<script src="test.object.js"></script>
- <script src="test.xhr.js"></script>
+ <script src="test.xhr.js"></script>
<script>
- $(function(){
- mocha
- .ignoreLeaks()
- .run()
- })
+ mocha.run();
</script>
-</head>
-<body>
- <div id="mocha"></div>
</body>
</html>
</code></pre>
-<p> <strong>NOTE</strong>: it&rsquo;s sometimes a good idea to <code>.ignoreLeaks()</code> in the browser, as this may have a significant impact on performance.</p>
-
<h3 id="grep-query">grep</h3>
diff --git a/index.md b/index.md
index 33fa5ca1..18c60e6c 100644
--- a/index.md
+++ b/index.md
@@ -571,28 +571,22 @@ Testing asynchronous code with Mocha could not be simpler! Simply invoke the cal
<meta charset="utf-8">
<title>Mocha Tests</title>
<link rel="stylesheet" href="mocha.css" />
+ </head>
+ <body>
+ <div id="mocha"></div>
<script src="jquery.js"></script>
<script src="expect.js"></script>
<script src="mocha.js"></script>
<script>mocha.setup('bdd')</script>
<script src="test.array.js"></script>
<script src="test.object.js"></script>
- <script src="test.xhr.js"></script>
+ <script src="test.xhr.js"></script>
<script>
- $(function(){
- mocha
- .ignoreLeaks()
- .run()
- })
+ mocha.run();
</script>
- </head>
- <body>
- <div id="mocha"></div>
</body>
</html>
- __NOTE__: it's sometimes a good idea to `.ignoreLeaks()` in the browser, as this may have a significant impact on performance.
-
<h3 id="grep-query">grep</h3>
The client-side may utilize `--grep` as well, however you use the query-string, for example `?grep=api`.