Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lying in the README.

  • Loading branch information...
commit 810a3fabc1af27c0abdaa6103073a064303bd8b9 1 parent ed712b7
@Yuffster authored
Showing with 30 additions and 3 deletions.
  1. +30 −3 README.md
View
33 README.md
@@ -12,8 +12,8 @@ describe( *groupName*, *tests*[, *options*] );
#### Arguments
- *groupName* (string): A human-readable description of the test group.
-- *tests* (object): An object made up of human-readable test descriptions as keys and
-functions to run as tests. Tests functions will be given access to
+- *tests* (object): An object made up of human-readable test descriptions as
+keys and functions to run as tests. Tests functions will be given access to
`this.expect`.
- *options*: Configuration options. Possible values:
- timeout (int): The max amount of time to wait for a test to run before
@@ -71,4 +71,31 @@ this.expect( *expected* )
'basic asynchronous expectation': function() {
addNumbersAsync(2, 2, this.expect(4));
}
- }, { callbackMode: 'node' });
+ }, { callbackMode: 'node' });
+
+### describe.getResults
+
+An asynchronous method. Calls back with the results of all tests described up
+to that point. You should probably wait until you're done defining tests to
+call this.
+
+#### Example Results
+
+ {
+ passed: 1,
+ total: 2,
+ tests: {
+ 'sample test group': {
+ passed: 1,
+ total: 2,
+ tests: {
+ 'this test passed because its error is null': null,
+ 'this test failed because there's an error': [Error]
+ }
+ }
+ }
+ }
+
+### describe.logResults
+
+Gets the results and outputs them either to the DOM or the console.
Please sign in to comment.
Something went wrong with that request. Please try again.