(exec)
| 24 | } |
| 25 | |
| 26 | function testCode(exec) { |
| 27 | if (typeof exec === 'function') { |
| 28 | var src = exec.toString(); |
| 29 | var functionBody = /^function\s*\w*\s*\(.*?\)\s*\{\s*\/\*([\s\S]*?)\*\/\s*\}$/m.exec(src); |
| 30 | if (functionBody) { |
| 31 | return '(function () { ' + removeIndent(functionBody[1]) + ' })()'; |
| 32 | } else { |
| 33 | return '(' + src + ')()'; |
| 34 | } |
| 35 | } else if (Array.isArray(exec)) { |
| 36 | return exec.map(function (e) { return testCode(e.script); }).join("; "); |
| 37 | } else { |
| 38 | return undefined; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | exports.runTests = function runTests(runner, key, family, options) { |
| 43 | options = options === undefined ? {} : options; |
no test coverage detected