дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 10:07:11 +02:00
test(svn): pick a Last Week revision that is last week on any weekday (#8290)
The M10 test dated its revision eight days back, which is two weeks back on a Sunday, so it failed every Sunday. It now uses Wednesday noon of last week.
Цей коміт міститься в:
1 джерело
e98eb5e755
коміт
ecd8404e66
1 file changed
+4
-1
@@ -897,7 +897,10 @@ describe("Incoming", () => {
|
||||
});
|
||||
|
||||
it("M10: follows the UI's language", async () => {
|
||||
mocks.svnIncomingRevisions.mockResolvedValue(ok([revision(A, 7, Date.now() - 8 * DAY)]));
|
||||
// Wednesday noon of last week: "now minus 8 days" falls two weeks back on a Sunday.
|
||||
const today = new Date();
|
||||
const lastWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() - today.getDay() - 4, 12);
|
||||
mocks.svnIncomingRevisions.mockResolvedValue(ok([revision(A, 7, lastWeek.getTime())]));
|
||||
render(<SvnIncomingPanel />);
|
||||
await screen.findByText("change 7");
|
||||
expect(screen.getByText("Last Week")).toBeInTheDocument();
|
||||
|
||||
Reference in new issue
Заблокувати користувача