Skip to content

Commit

Permalink
Update spawn test for gitVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
tidy-dev committed Mar 9, 2021
1 parent c499c2d commit f7a96c0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/slow/git-spawn-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit f7a96c0

Please sign in to comment.