mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 22:08:26 +00:00
chore: Fix types in tests 37/N.
This commit is contained in:
@@ -28,7 +28,7 @@ async function createBootstrapContext(params: {
|
||||
sessionKey: string;
|
||||
rootFiles: Array<{ name: string; content: string }>;
|
||||
}): Promise<AgentBootstrapHookContext> {
|
||||
const bootstrapFiles = await Promise.all(
|
||||
const bootstrapFiles = (await Promise.all(
|
||||
params.rootFiles.map(async (file) => ({
|
||||
name: file.name,
|
||||
path: await writeWorkspaceFile({
|
||||
@@ -39,7 +39,7 @@ async function createBootstrapContext(params: {
|
||||
content: file.content,
|
||||
missing: false,
|
||||
})),
|
||||
);
|
||||
)) as AgentBootstrapHookContext["bootstrapFiles"];
|
||||
return {
|
||||
workspaceDir: params.workspaceDir,
|
||||
bootstrapFiles,
|
||||
|
||||
@@ -21,7 +21,7 @@ beforeAll(async () => {
|
||||
* Create a mock session JSONL file with various entry types
|
||||
*/
|
||||
function createMockSessionContent(
|
||||
entries: Array<{ role: string; content: string } | { type: string }>,
|
||||
entries: Array<{ role: string; content: string } | ({ type: string } & Record<string, unknown>)>,
|
||||
): string {
|
||||
return entries
|
||||
.map((entry) => {
|
||||
|
||||
Reference in New Issue
Block a user