Permalink
Browse files

Output example in README

  • Loading branch information...
1 parent 3ef3d51 commit 35b796d43f25d57fb77547fe856e02bfc22bd910 @joelplane joelplane committed Jun 19, 2011
Showing with 28 additions and 16 deletions.
  1. +28 −16 README.md
View
@@ -10,22 +10,8 @@ of this goal somewhere, but we'll try our best.
It's a BDD-esc library in it's syntax, but that's about as far as it
goes in terms of BDD.
-Example
--------
-
-**Basic Syntax**:
-
- var test = require('testnode')();
- test.onFailureExitNonZero();
-
- test.context("Example Test Suite", function() {
- this.context("Example Sub-Context", function() {
- this.it("Basic Test Example", function(test) {
- test.assert(true);
- test.done();
- });
- });
- });
+Usage and Example
+-----------------
**Executing tests**:
@@ -35,6 +21,32 @@ OR
testnode testsDirectory
+**Basic Syntax**:
+
+```javascript
+var test = require('testnode')();
+test.onFailureExitNonZero();
+
+test.context("Example Test Suite", function() {
+ this.context("Example Sub-Context", function() {
+ this.it("should run a basic example test", function(test) {
+ test.assert(true);
+ test.done();
+ });
+ });
+});
+```
+
+**Output**:
+
+```
+Example Test Suite
+ Example Sub-Context
+ it should run a basic example test
+ +
+ 1 assertion passed
+```
+
See the examples directory for more examples.
Installation

0 comments on commit 35b796d

Please sign in to comment.