Skip to content

Commit b6cf754

Browse files
authored
Merge pull request #981 from steveukx/fix/977
Integration test covering error reported in #977
2 parents 45e904b + 6883522 commit b6cf754

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.md
22
.changeset
3+
.yarn
34
dist
45
coverage
56
node_modules

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"build": "lerna run build",
1515
"clean": "git clean -fxd -e .idea -e node_modules -e .yarn",
1616
"clean:cache": "git clean -fxd .yarn node_modules packages simple-git",
17+
"format": "prettier --write .",
1718
"test": "lerna run test"
1819
},
1920
"dependencies": {
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { promiseError } from '@kwsites/promise-result';
2+
import { newSimpleGit } from '@simple-git/test-utils';
3+
4+
describe('log-numstat', function () {
5+
it('custom format and date range should not fail when also setting numstat', async () => {
6+
const ac = new AbortController();
7+
const log = newSimpleGit(__dirname, {
8+
abort: ac.signal,
9+
}).log({
10+
'format': {
11+
H: '%H',
12+
h: '%h',
13+
P: '%P',
14+
p: '%p',
15+
aI: '%aI',
16+
s: '%s',
17+
D: '%D',
18+
b: '%b',
19+
an: '%an',
20+
ae: '%ae',
21+
},
22+
'--all': null,
23+
'--since': '2024-02-04',
24+
'--numstat': null,
25+
});
26+
27+
setTimeout(() => ac.abort(), 500);
28+
29+
expect(await promiseError(log)).toBeUndefined();
30+
});
31+
});

0 commit comments

Comments
 (0)