diff --git a/README.md b/README.md index 7690a27..a3d88cb 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/index.js b/index.js index 2a5a486..f016d9b 100644 --- a/index.js +++ b/index.js @@ -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); diff --git a/package.json b/package.json index 88c5546..73e7add 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,10 @@ { "name": "Milan Gardian", "url": "https://github.com/milang" + }, + { + "name": "Jason Heard", + "url": "https://github.com/101100" } ], "keywords": [