From 65140edf778e3dc8f0237d3194b676979f3e8a2b Mon Sep 17 00:00:00 2001 From: Paul Hatcherian <1835615+PaulHatch@users.noreply.github.com> Date: Wed, 7 Oct 2020 18:33:21 -0400 Subject: [PATCH] Update test to support Windows --- index.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.test.js b/index.test.js index 9f801db..54a451b 100644 --- a/index.test.js +++ b/index.test.js @@ -36,7 +36,11 @@ const createTestRepo = (inputs) => { return { clean: () => execute(os.tmpdir(), `rm -rf ${repoDirectory}`), 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 commit -m "${msg}"`); },