mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-11 08:38:24 +00:00
test(ui): preserve data utility exports in usage tests
This commit is contained in:
parent
e07c9c3d04
commit
7c936f154d
1 changed files with 8 additions and 5 deletions
|
|
@ -48,11 +48,14 @@ vi.mock("antd", () => {
|
|||
};
|
||||
});
|
||||
|
||||
vi.mock("@/utils/dataUtils", () => ({
|
||||
formatNumberWithCommas: (value: number, decimals?: number) => {
|
||||
return value.toFixed(decimals || 0);
|
||||
},
|
||||
}));
|
||||
vi.mock("@/utils/dataUtils", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@/utils/dataUtils")>();
|
||||
|
||||
return {
|
||||
...actual,
|
||||
formatNumberWithCommas: (value: number, decimals?: number) => value.toFixed(decimals || 0),
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("@/utils/teamUtils", () => ({
|
||||
resolveTeamAliasFromTeamID: (teamID: string, teams: any[]) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue