(name)
| 1197 | } |
| 1198 | |
| 1199 | function 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 | } |