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

Function setupWithScripts

src/scripts/__tests__/validate.js:63–72  ·  view source on GitHub ↗
(scripts = ['test', 'lint', 'build', 'typecheck'])

Source from the content-addressed store, hash-verified

61)
62
63function setupWithScripts(scripts = ['test', 'lint', 'build', 'typecheck']) {
64 return function setup() {
65 const utils = require('../../utils')
66 const originalIfScript = utils.ifScript
67 utils.ifScript = (script, t, f) => (scripts.includes(script) ? t : f)
68 return function teardown() {
69 utils.ifScript = originalIfScript
70 }
71 }
72}
73
74function setupWithArgs(args = []) {
75 return function setup() {

Callers 2

validate.jsFile · 0.85
withDefaultSetupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…