mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
test(tours): read the last undo without Array.at, which the client lib does not offer
This commit is contained in:
@@ -81,7 +81,10 @@ function writesThatLand() {
|
||||
}
|
||||
|
||||
const render = () => renderHook(() => useTourDayChoice(options));
|
||||
const lastUndo = () => vi.mocked(options.pushUndo).mock.calls.at(-1)?.[1] as Undo;
|
||||
const lastUndo = () => {
|
||||
const calls = vi.mocked(options.pushUndo).mock.calls;
|
||||
return calls[calls.length - 1]?.[1] as Undo;
|
||||
};
|
||||
|
||||
describe('useTourDayChoice', () => {
|
||||
it('FE-TOUR-STAGE-SPREAD-010: a place, a day tour and a tour put whole on purpose go on at once', async () => {
|
||||
|
||||
Reference in New Issue
Block a user