Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 6da5007

Browse files
Merge pull request #1019 from telerik/vladimirov/fix-tests
Fix unit tests on Windows
2 parents d20d42d + 80fe24c commit 6da5007

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/unit-tests/mobile/android/logcat-helper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ class ChildProcessStub {
1111
public spawn(command: string, args?: string[], options?: any): childProcess.ChildProcess {
1212
ChildProcessStub.methodCallCount++;
1313
let pathToExecutable = "";
14+
let shell = "";
1415
if (this.isWin) {
1516
pathToExecutable = "type";
17+
shell = "cmd";
1618
} else {
1719
pathToExecutable = "cat";
1820
}
1921
pathToExecutable = path.join(pathToExecutable);
2022
const pathToSample = path.join(__dirname, "valid-sample.txt");
21-
return childProcess.spawn(pathToExecutable, [pathToSample]);
23+
24+
return childProcess.spawn(pathToExecutable, [pathToSample], { shell });
2225
}
2326
}
2427

0 commit comments

Comments
 (0)