(method)
| 1774 | }; |
| 1775 | |
| 1776 | function ensureIsNotNested(method) { |
| 1777 | const runable = runner.currentRunable(); |
| 1778 | if (runable !== null && runable !== undefined) { |
| 1779 | throw new Error("'" + method + "' should only be used in 'describe' function"); |
| 1780 | } |
| 1781 | } |
| 1782 | |
| 1783 | this.describe = function (description, definitionFn) { |
| 1784 | ensureIsNotNested('describe'); |