- Extract club information (clubId, clubName) from event page in `getEventInfo`. - Update `getMatchDetail` to return both `detail` and `summary`. - Introduce `MatchSummary` interface in `src/types/index.ts`. - Update `EventPage` to display the club name and link to the club page. - Adjust `EventSubscribeService` and loaders to handle the new return structure. - Clean up test files and mock data loading logic.
22 lines
461 B
TypeScript
22 lines
461 B
TypeScript
import { expect, test } from 'bun:test';
|
|
import { sneckGroup } from '../src/utils/common';
|
|
|
|
test("group", () => {
|
|
const group = sneckGroup(48, 6);
|
|
/**
|
|
* A B
|
|
* [01] [07]
|
|
* [02] [08]
|
|
* [05] [09]
|
|
* [06] [10]
|
|
* A B
|
|
* [01] [08]
|
|
* [07] [02]
|
|
* [05] [10]
|
|
* [09] [06]
|
|
*/
|
|
expect(group?.[0]?.[0]).toBe(0);
|
|
expect(group?.[0]?.[1]).toBe(11);
|
|
expect(group?.[1]?.[0]).toBe(1);
|
|
expect(group?.[1]?.[1]).toBe(10);
|
|
}) |