codenautas/qa-control-server

View on GitHub
util/test-dir.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";
/*jshint eqnull:true */
/*jshint globalstrict:true */
/*jshint node:true */
/* global describe */
/* global it */

var fs = require('fs-extra');
var Path = require('path');

var testDir = {};

if(process.env.TRAVIS){
    testDir.temp = process.env.HOME;
}else{
    testDir.temp = process.env.TMP || process.env.TEMP || '/tmp';
}

testDir.getDir = function getDir(topDir) {
    return Path.normalize(testDir.temp + '/' + topDir); 
};

module.exports = testDir;