Skip to content

Commit

Permalink
Update failing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tidy-dev committed Mar 9, 2021
1 parent b29ae56 commit c499c2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/fast/git-process-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as crypto from 'crypto'

import { GitProcess, GitError, RepositoryDoesNotExistErrorCode } from '../../lib'
import { GitErrorRegexes } from '../../lib/errors'
import { initialize, verify, initializeWithRemote } from '../helpers'
import { initialize, verify, initializeWithRemote, gitForWindowsVersion } from '../helpers'

import { gitVersion } from '../helpers'

Expand All @@ -14,7 +14,11 @@ describe('git-process', () => {
it('can launch git', async () => {
const result = await GitProcess.exec(['--version'], __dirname)
expect(result.stderr).toBe('')
expect(result.stdout).toContain(`git version ${gitVersion}`)
if (result.stdout.includes('windows')) {
expect(result.stdout).toContain(`git version ${gitForWindowsVersion}`)
} else {
expect(result.stdout).toContain(`git version ${gitVersion}`)
}
expect(result.exitCode).toBe(0)
})

Expand Down
1 change: 1 addition & 0 deletions test/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { GitProcess, IGitResult, GitError } from '../lib'

// NOTE: bump these versions to the latest stable releases
export const gitVersion = '2.29.3'
export const gitForWindowsVersion = '2.29.2.windows.4'
export const gitLfsVersion = '2.13.2'

const temp = require('temp').track()
Expand Down

0 comments on commit c499c2d

Please sign in to comment.