mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
test(spec): type-check the spec api as part of make test
The fake runtime in api.test.ts did not return a chainable handle from extract, so the file had not type-checked since named() was added. Wiring the check into make test stops it drifting again. Claude-Session: https://claude.ai/code/session_01Fj4wJUikdABuMQEETwW55J
This commit is contained in:
1 parent
d25b56379a
commit
12eb1439e9
2 files changed
+11
-3
No files matched your search
@@ -112,7 +112,12 @@ function installFakeRuntime(): RecordedRuntime {
|
||||
extract: <T>(getter: (state: State) => T, name?: string): Extracted<T> => {
|
||||
calls.extracts.push(getter as (state: State) => unknown);
|
||||
calls.extractNames.push(name);
|
||||
return { current: undefined as unknown as T, previous: undefined };
|
||||
const handle: Extracted<T> = {
|
||||
current: undefined as unknown as T,
|
||||
previous: undefined,
|
||||
named: () => handle,
|
||||
};
|
||||
return handle;
|
||||
},
|
||||
always: (predicateOrFormula: (() => boolean) | Formula): Formula => {
|
||||
calls.alwaysArgs.push(predicateOrFormula);
|
||||
|
||||
Reference in new issue
Block a user