mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
test(insights): type the batch finalize fixture to satisfy lint
This commit is contained in:
1 parent
e6d48e2de5
commit
07333e17c7
1 file changed
+6
-2
@@ -60,7 +60,7 @@ function servedCard() {
|
||||
function pendingCard(
|
||||
metric: string,
|
||||
finalize: (arg: { content: string }) => Promise<unknown> = vi.fn(
|
||||
async (_arg: { content: string }) => ({}),
|
||||
async (): Promise<unknown> => ({}),
|
||||
),
|
||||
) {
|
||||
const timeout = vi.fn(() => ({
|
||||
@@ -100,7 +100,11 @@ beforeEach(() => {
|
||||
|
||||
describe("generateStatusBatchForUser — one call covers all present metrics", () => {
|
||||
it("issues exactly ONE provider call for the seven pending cards and fans each summary into its finalize", async () => {
|
||||
const mkFinalize = () => vi.fn(async (_arg: { content: string }) => ({}));
|
||||
const mkFinalize = () =>
|
||||
vi.fn((arg: { content: string }): Promise<unknown> => {
|
||||
void arg;
|
||||
return Promise.resolve({});
|
||||
});
|
||||
const finalizers = {
|
||||
"blood-pressure": mkFinalize(),
|
||||
weight: mkFinalize(),
|
||||
|
||||
Reference in new issue
Block a user