Skip to content

Commit

Permalink
fix: implement explicit form property with _getAppendedData and appen…
Browse files Browse the repository at this point in the history
…d methods
  • Loading branch information
devin-ai-integration[bot] committed Dec 25, 2024
1 parent 2851520 commit e9b307b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/resources/drafts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ jest.mock('formdata-node', () => {
}
},
_getAppendedData: getAppendedData,
get form() {
return this;
},
form: {
_getAppendedData: getAppendedData,
append(key: string, value: any): void {
if (value && typeof value === 'object' && 'content' in value) {
// Handle File objects
appendedData[key] = value.content;
} else {
appendedData[key] = value;
}
}
}
};

return formData as MockedFormData;
Expand Down

0 comments on commit e9b307b

Please sign in to comment.