Skip to content

Commit

Permalink
Merge pull request #6 from pandell/remove-mocha-require
Browse files Browse the repository at this point in the history
- Remove mocha require
  • Loading branch information
101100 committed Aug 20, 2014
2 parents 3e33c89 + 25e74ed commit 7dc5ff4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ _Type_: Array or argument list
_Default_: empty array

Values to pass to the test. If the arguments themselves are arrays, they will be passed as multiple arguments to the test function.
If a data item is an object, the `description` property is used to construct the individual test name.

Returns:
- `it`: define a test case (for use with BDD interface)
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

var util = require('util');

var test = global.test || global.it || require('mocha').test;
var test = global.test || global.it;

if (!test) {
throw new Error("'mocha' must be required before 'mocha-testdata'");
}

function testData(async) {
var args = Array.prototype.slice.call(arguments, 1);
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
{
"name": "Milan Gardian",
"url": "https://github.com/milang"
},
{
"name": "Jason Heard",
"url": "https://github.com/101100"
}
],
"keywords": [
Expand Down

0 comments on commit 7dc5ff4

Please sign in to comment.