MCPcopy
hub / github.com/expressjs/generator / setupTestEnvironment

Function setupTestEnvironment

test/cmd.js:1199–1213  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1197}
1198
1199function setupTestEnvironment (name) {
1200 var ctx = {}
1201
1202 before('create environment', function (done) {
1203 ctx.dir = path.join(TEMP_DIR, name.replace(/[<>]/g, ''))
1204 mkdirp(ctx.dir, done)
1205 })
1206
1207 after('cleanup environment', function (done) {
1208 this.timeout(30000)
1209 rimraf(ctx.dir, done)
1210 })
1211
1212 return ctx
1213}

Callers 1

cmd.jsFile · 0.85

Calls 1

beforeFunction · 0.85

Tested by

no test coverage detected