Skip to content

Commit 47e2370

Browse files
committed
Some tests to pin the new statistical capabilities (#470)
1 parent bf63a13 commit 47e2370

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

tests/journey/ein.sh

+18
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,24 @@ title "Porcelain ${kind}"
5555
expect_run_sh $SUCCESSFULLY "$exe t estimate-hours --omit-unify-identities 2>/dev/null"
5656
}
5757
)
58+
(with "the --file-stats argument"
59+
it "succeeds and shows file statistics" && {
60+
WITH_SNAPSHOT="$snapshot/file-stats-success" \
61+
expect_run_sh $SUCCESSFULLY "$exe tool estimate-hours --file-stats 2>/dev/null"
62+
}
63+
)
64+
(with "the --line-stats argument"
65+
it "succeeds and shows line statistics" && {
66+
WITH_SNAPSHOT="$snapshot/line-stats-success" \
67+
expect_run_sh $SUCCESSFULLY "$exe tool estimate-hours --line-stats 2>/dev/null"
68+
}
69+
)
70+
(with "all --stats arguments and pii"
71+
it "succeeds and shows all statistics" && {
72+
WITH_SNAPSHOT="$snapshot/all-stats-success" \
73+
expect_run_sh $SUCCESSFULLY "$exe tool estimate-hours -pfl 2>/dev/null"
74+
}
75+
)
5876
(with "a branch name that doesn't exist"
5977
it "fails and shows a decent enough error message" && {
6078
WITH_SNAPSHOT="$snapshot/invalid-branch-name-failure" \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Sebastian Thiel <[email protected]>
2+
3 commits found
3+
total time spent: 2.00h (0.25 8h days, 100.00%)
4+
total files added/removed/modified: 1/0/1 (100.00%)
5+
total lines added/removed: 1/0 (100.00%)
6+
7+
total hours: 2.00
8+
total 8h days: 0.25
9+
total commits = 3
10+
total authors: 1
11+
total files added/removed/modified: 1/0/1
12+
total lines added/removed: 1/0
13+
total unique authors: 1 (0.00% duplication)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
total hours: 2.00
2+
total 8h days: 0.25
3+
total commits = 3
4+
total authors: 1
5+
total files added/removed/modified: 1/0/1
6+
total unique authors: 1 (0.00% duplication)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
total hours: 2.00
2+
total 8h days: 0.25
3+
total commits = 3
4+
total authors: 1
5+
total lines added/removed: 1/0
6+
total unique authors: 1 (0.00% duplication)

0 commit comments

Comments
 (0)