MCPcopy
hub / github.com/MithrilJS/mithril.js / unique

Function unique

ospec/ospec.js:200–206  ·  view source on GitHub ↗
(subject)

Source from the content-addressed store, hash-verified

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)

Callers 2

oFunction · 0.85
ospec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected