Split commands so that tests can run on Windows

This commit is contained in:
Paul Hatcherian 2020-10-06 08:40:21 -04:00
parent 596215aec5
commit 800ea493f7

View file

@ -14,7 +14,8 @@ const defaultInputs = {
// Creates a randomly named git repository and returns a function to execute commands in it // Creates a randomly named git repository and returns a function to execute commands in it
const createTestRepo = (inputs) => { const createTestRepo = (inputs) => {
const repoDirectory = `/tmp/test${Math.random().toString(36).substring(2, 15)}`; const repoDirectory = `/tmp/test${Math.random().toString(36).substring(2, 15)}`;
cp.execSync(`mkdir ${repoDirectory} && git init ${repoDirectory}`); cp.execSync(`mkdir ${repoDirectory}`);
cp.execSync(`git init ${repoDirectory}`);
const run = (command, extraInputs) => { const run = (command, extraInputs) => {
const allInputs = Object.assign({ ...defaultInputs }, inputs, extraInputs); const allInputs = Object.assign({ ...defaultInputs }, inputs, extraInputs);