From f7a96c01f0d7ee66a9e09ac55191af660337de40 Mon Sep 17 00:00:00 2001 From: tidy-dev Date: Tue, 9 Mar 2021 16:27:55 -0500 Subject: [PATCH] Update spawn test for gitVersion --- test/slow/git-spawn-test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/slow/git-spawn-test.ts b/test/slow/git-spawn-test.ts index e46ea95d..a3c51b11 100644 --- a/test/slow/git-spawn-test.ts +++ b/test/slow/git-spawn-test.ts @@ -4,7 +4,7 @@ import * as Path from 'path' import { ChildProcess } from 'child_process' import { GitProcess } from '../../lib' -import { gitVersion } from '../helpers' +import { gitForWindowsVersion, gitVersion } from '../helpers' const temp = require('temp').track() const maximumStringSize = 268435441 @@ -38,7 +38,11 @@ describe('GitProcess.spawn', () => { it('can launch git', async () => { const process = GitProcess.spawn(['--version'], __dirname) const result = await bufferOutput(process) - expect(result).toContain(`git version ${gitVersion}`) + if (result.includes('windows')) { + expect(result).toContain(`git version ${gitForWindowsVersion}`) + } else { + expect(result).toContain(`git version ${gitVersion}`) + } }) it('returns expected exit codes', done => {