Skip to content

armgit / mocha

Public Imported from GitHub
0

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

docs

Tj Holowaychuk5ef7b7a50cd1
diff --git a/Readme.md b/Readme.md
index 3bbba11d..fb911af3 100644
--- a/Readme.md
+++ b/Readme.md
@@ -78,23 +78,6 @@ describe('Array', function(){
![dot matrix failure](http://f.cl.ly/items/1P11330L033r423g1y1n/Screenshot.png)
-## JSON
-
- The JSON reporter outputs a single large JSON object when
- the tests have completed (failures or not).
-
-## JSON Stream
-
- The JSON Stream reporter outputs newline-delimited JSON "events" as they occur, beginning with a "start" event, followed by test passes or failures, and then the final "end" event.
-
-```json
-["start",{"total":12}]
-["pass",{"title":"should return -1 when not present","fullTitle":"Array #indexOf() should return -1 when not present","duration":0}]
-["pass",{"title":"should return the index when present","fullTitle":"Array #indexOf() should return the index when present","duration":0}]
-["fail",{"title":"should return -1 when not present","fullTitle":"Array #indexOf() should return -1 when not present"}]
-["end",{"start":"2011-08-29T03:21:02.050Z","suites":13,"passes":11,"tests":12,"failures":1,"end":"2011-08-29T03:21:02.052Z","duration":2}]
-````
-
## TAP
The TAP reporter emits lines for a [Test-Anything-Protocol](http://en.wikipedia.org/wiki/Test_Anything_Protocol) consumer.
@@ -118,6 +101,23 @@ describe('Array', function(){
![failures](http://f.cl.ly/items/2Z0E150v20042G2d1J0i/Screenshot.png)
+## JSON
+
+ The JSON reporter outputs a single large JSON object when
+ the tests have completed (failures or not).
+
+## JSON Stream
+
+ The JSON Stream reporter outputs newline-delimited JSON "events" as they occur, beginning with a "start" event, followed by test passes or failures, and then the final "end" event.
+
+```json
+["start",{"total":12}]
+["pass",{"title":"should return -1 when not present","fullTitle":"Array #indexOf() should return -1 when not present","duration":0}]
+["pass",{"title":"should return the index when present","fullTitle":"Array #indexOf() should return the index when present","duration":0}]
+["fail",{"title":"should return -1 when not present","fullTitle":"Array #indexOf() should return -1 when not present"}]
+["end",{"start":"2011-08-29T03:21:02.050Z","suites":13,"passes":11,"tests":12,"failures":1,"end":"2011-08-29T03:21:02.052Z","duration":2}]
+````
+
## Best practices
### Makefiles