Skip to content

Commit 06f708a

Browse files
Murali Medisettymurali89
authored andcommitted
Add expected windows env variables for unit tests
1 parent f43e0db commit 06f708a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Tasks/Npm/Tests/test-commandWithoutArguments.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import util = require('./NpmMockHelper');
66
let taskPath = path.join(__dirname, '..', 'npmtask.js');
77
let taskMockRunner = new tmrm.TaskMockRunner(taskPath);
88
let npmMockHelper = new util.NpmMockHelper(taskMockRunner, "root", "");
9+
process.env['HOMEDRIVE'] = 'C:\\';
10+
process.env['HOMEPATH'] = 'Users\\none';
911

1012
if (process.argv.length == 3) {
1113
if (process.argv[2] === "useDeprecated") {

Tasks/Npm/Tests/test-configlist.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import util = require('./NpmMockHelper');
66
let taskPath = path.join(__dirname, '..', 'npmtask.js');
77
let taskMockRunner = new tmrm.TaskMockRunner(taskPath);
88
let npmMockHelper = new util.NpmMockHelper(taskMockRunner, "config", "list");
9+
process.env['HOMEDRIVE'] = 'C:\\';
10+
process.env['HOMEPATH'] = 'Users\\none';
911

1012
if (process.argv.length == 3) {
1113
if (process.argv[2] === "useDeprecated") {

Tasks/Npm/Tests/test-npmFailure.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import util = require('./NpmMockHelper');
66
let taskPath = path.join(__dirname, '..', 'npmtask.js');
77
let taskMockRunner = new tmrm.TaskMockRunner(taskPath);
88
let npmMockHelper = new util.NpmMockHelper(taskMockRunner, "root", "");
9+
process.env['HOMEDRIVE'] = 'C:\\';
10+
process.env['HOMEPATH'] = 'Users\\none';
911

1012
let mock = require('vsts-task-lib/mock-toolrunner');
1113
mock.exec = () => {

0 commit comments

Comments
 (0)