MCPcopy
hub / github.com/codeceptjs/CodeceptJS / makeDoneCallableOnce

Function makeDoneCallableOnce

lib/mocha/asyncWrapper.js:30–39  ·  view source on GitHub ↗
(done)

Source from the content-addressed store, hash-verified

28}
29
30function makeDoneCallableOnce(done) {
31 let called = false
32 return function (err) {
33 if (called) {
34 return
35 }
36 called = true
37 return done(err)
38 }
39}
40
41/**
42 * Wraps test function, injects support objects from container,

Callers 6

testFunction · 0.85
injectedFunction · 0.85
setupFunction · 0.85
teardownFunction · 0.85
suiteSetupFunction · 0.85
suiteTeardownFunction · 0.85

Calls 1

doneFunction · 0.85

Tested by 1

testFunction · 0.68