Reset process.cwd after cds run
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const { resolve, dirname } = require('path')
|
const { resolve, dirname } = require('path')
|
||||||
|
const cwd = process.cwd()
|
||||||
|
|
||||||
// harmonizing jest and mocha
|
// harmonizing jest and mocha
|
||||||
const is_mocha = !global.test
|
const is_mocha = !global.test
|
||||||
@@ -120,6 +121,7 @@ class CDSTestKit {
|
|||||||
// shutdown cds server...
|
// shutdown cds server...
|
||||||
after (done => {
|
after (done => {
|
||||||
if (global.console !== console) global.console = console
|
if (global.console !== console) global.console = console
|
||||||
|
if (cwd !== process.cwd()) process.chdir(cwd)
|
||||||
test.server ? test.server.close (done) : done()
|
test.server ? test.server.close (done) : done()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user