mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-29 15:44:26 +00:00
Tests: Use a tmp data dir to avoid conflicts/overwriting existing data
Change-type: patch
This commit is contained in:
parent
53b2b54b23
commit
511bb05cb9
@ -15,6 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as tmp from 'tmp';
|
||||
tmp.setGracefulCleanup();
|
||||
// Use a temporary dir for tests data
|
||||
process.env.BALENARC_DATA_DIRECTORY = tmp.dirSync().name;
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
EventEmitter.defaultMaxListeners = 35; // it appears that 'nock' adds a bunch of listeners - bug?
|
||||
// SL: Looks like it's not nock causing this, as have seen the problem triggered from help.spec,
|
||||
|
Loading…
x
Reference in New Issue
Block a user