Skip to content

Commit

Permalink
chore: Fix tests on Windows (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring authored and okonet committed Jun 11, 2019
1 parent e770d8f commit bffef73
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions test/gitStash.spec.js
Expand Up @@ -88,7 +88,8 @@ describe('git', () => {
})

it('should return false if there are untracked files', async () => {
await execa('touch', ['untracked.file'], gitOpts)
const touch = process.platform === 'win32' ? 'echo.>' : 'touch'
await execa(touch, ['untracked.file'], gitOpts)
const res = await gitflow.hasPartiallyStagedFiles(gitOpts)
expect(res).toEqual(false)
})
Expand Down Expand Up @@ -426,12 +427,12 @@ MM test.js"
path.join(wcDirPath, 'test.js'),
`module.exports = {
test: 'test',
foo: '
baz
'
Expand All @@ -444,12 +445,12 @@ MM test.js"
path.join(wcDirPath, 'test.js'),
`module.exports = {
test: 'edited',
foo: '
baz
'
Expand All @@ -472,11 +473,11 @@ MM test.js"
path.join(wcDirPath, 'test.js'),
`module.exports = {
test: "test",
foo: "baz"
};`
Expand All @@ -494,11 +495,11 @@ MM test.js"
expect(await gitflow.execGit(['diff', '--cached'], gitOpts)).toEqual(indexAfterEslint)
expect(await readFile('test.js')).toEqual(`module.exports = {
test: 'edited',
foo: "baz"
};`)
Expand Down

0 comments on commit bffef73

Please sign in to comment.