MCPcopy Create free account
hub / github.com/kentcdodds/kcd-scripts / withDefaultSetup

Function withDefaultSetup

src/scripts/__tests__/validate.js:88–101  ·  view source on GitHub ↗
(setupFn)

Source from the content-addressed store, hash-verified

86}
87
88function withDefaultSetup(setupFn) {
89 return function defaultSetup() {
90 const utils = require('../../utils')
91 utils.resolveBin = (modName, {executable = modName} = {}) => executable
92 const argsTeardown = setupWithArgs()()
93 const teardownScripts = setupWithScripts()()
94 const teardownFn = setupFn()
95 return function defaultTeardown() {
96 argsTeardown()
97 teardownFn()
98 teardownScripts()
99 }
100 }
101}

Callers 1

validate.jsFile · 0.85

Calls 2

setupWithArgsFunction · 0.85
setupWithScriptsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…