Update test to support Windows

This commit is contained in:
Paul Hatcherian 2020-10-07 18:33:21 -04:00
parent 5c67e25f43
commit 65140edf77

View file

@ -36,7 +36,11 @@ const createTestRepo = (inputs) => {
return { return {
clean: () => execute(os.tmpdir(), `rm -rf ${repoDirectory}`), clean: () => execute(os.tmpdir(), `rm -rf ${repoDirectory}`),
makeCommit: (msg, path) => { makeCommit: (msg, path) => {
run(`touch ${path !== undefined ? path.trim('/') + '/' : ''}test${i++}`); if (process.platform === "win32") {
run(`fsutil file createnew ${path !== undefined ? path.trim('/') + '/' : ''}test${i++} 0`);
} else {
run(`touch ${path !== undefined ? path.trim('/') + '/' : ''}test${i++}`);
}
run(`git add --all`); run(`git add --all`);
run(`git commit -m "${msg}"`); run(`git commit -m "${msg}"`);
}, },