test: harden decision storage round-trip evidence
This commit is contained in:
@@ -39,5 +39,12 @@ export function createFileDecisionStore({ decisionsDir, repoRootOverride } = {})
|
||||
artifactPath: resolvedPath,
|
||||
};
|
||||
},
|
||||
consume(artifactPath, consumer) {
|
||||
if (typeof consumer !== 'function') {
|
||||
throw new Error('decision store consumer must be a function');
|
||||
}
|
||||
const loaded = this.load(artifactPath);
|
||||
return consumer(loaded);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user