(subject)
| 198 | } |
| 199 | } |
| 200 | function unique(subject) { |
| 201 | if (hasOwn.call(ctx, subject)) { |
| 202 | console.warn("A test or a spec named `" + subject + "` was already defined") |
| 203 | while (hasOwn.call(ctx, subject)) subject += "*" |
| 204 | } |
| 205 | return subject |
| 206 | } |
| 207 | function hook(name) { |
| 208 | return function(predicate) { |
| 209 | if (ctx[name]) throw new Error("This hook should be defined outside of a loop or inside a nested test group:\n" + predicate) |