Skip to content

Commit a1ebbbd

Browse files
committed
update entities and function TypeRegistry in tests
1 parent 24b39a4 commit a1ebbbd

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

tests/unit/entities.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ interface Todo {
1212
completed: boolean;
1313
}
1414

15-
// Declaration merging: extend EntitiesModule with typed Todo handler
15+
// Module augmentation: register Todo type in EntityTypeRegistry
1616
declare module "../../src/modules/entities.types.ts" {
17-
interface EntitiesModule {
18-
Todo: EntityHandler<Todo>;
17+
interface EntityTypeRegistry {
18+
Todo: Todo;
1919
}
2020
}
2121

tests/unit/functions.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ import { describe, test, expect, beforeEach, afterEach } from "vitest";
22
import nock from "nock";
33
import { createClient } from "../../src/index.ts";
44

5+
// Module augmentation: register function names in FunctionNameRegistry
6+
declare module "../../src/modules/functions.types.ts" {
7+
interface FunctionNameRegistry {
8+
sendNotification: true;
9+
processOrder: true;
10+
generateReport: true;
11+
}
12+
}
13+
514
describe("Functions Module", () => {
615
let base44: ReturnType<typeof createClient>;
716
let scope;

0 commit comments

Comments
 (0)