Skip to content

Commit 2039bf9

Browse files
committed
test: snapshot assertions, unit tests, fix login network dependency
- Replace spot-check assertions with deepStrictEqual against expected-snapshot.json - Add unit tests for API.getStats, API.getRanks (with tiebreak edge cases), Util.post - Populate admindata.json fixture so /login avoids real GitHub API calls - Add Cache-Control header tests, persistence verification tests - Test invalid JSON (400) on all POST endpoints - Add /add, /getRepositories endpoint tests - Expose response headers in test helper - Add cross-endpoint data consistency tests
1 parent feccf09 commit 2039bf9

7 files changed

Lines changed: 1349 additions & 70 deletions

File tree

tests/e2e/fixtures/admindata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[]
1+
[{"username":"dhairyashiil","avatarUrl":"https://avatars.githubusercontent.com/u/93669429?v=4"}]

tests/e2e/fixtures/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"delay": "10",
88
"serverPort": "63111",
99
"startDate": "2024-12-01",
10-
"contributors": [],
10+
"contributors": ["dhairyashiil"],
1111
"includedRepositories": ["Rocket.Chat"]
1212
}

0 commit comments

Comments
 (0)