Skip to content

Commit

Permalink
Merge pull request #981 from steveukx/fix/977
Browse files Browse the repository at this point in the history
Integration test covering error reported in #977
  • Loading branch information
steveukx authored Mar 9, 2024
2 parents 45e904b + 6883522 commit b6cf754
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.md
.changeset
.yarn
dist
coverage
node_modules
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"build": "lerna run build",
"clean": "git clean -fxd -e .idea -e node_modules -e .yarn",
"clean:cache": "git clean -fxd .yarn node_modules packages simple-git",
"format": "prettier --write .",
"test": "lerna run test"
},
"dependencies": {
Expand Down
31 changes: 31 additions & 0 deletions simple-git/test/integration/log-numstat.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { promiseError } from '@kwsites/promise-result';
import { newSimpleGit } from '@simple-git/test-utils';

describe('log-numstat', function () {
it('custom format and date range should not fail when also setting numstat', async () => {
const ac = new AbortController();
const log = newSimpleGit(__dirname, {
abort: ac.signal,
}).log({
'format': {
H: '%H',
h: '%h',
P: '%P',
p: '%p',
aI: '%aI',
s: '%s',
D: '%D',
b: '%b',
an: '%an',
ae: '%ae',
},
'--all': null,
'--since': '2024-02-04',
'--numstat': null,
});

setTimeout(() => ac.abort(), 500);

expect(await promiseError(log)).toBeUndefined();
});
});

0 comments on commit b6cf754

Please sign in to comment.