Skip to content

Commit

Permalink
fix: improve FormData mock with direct getter implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] committed Dec 25, 2024
1 parent ebd483a commit 2851520
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/resources/drafts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,10 @@ jest.mock('formdata-node', () => {
}
},
_getAppendedData: getAppendedData,
};

// Create a form property that references the same object
Object.defineProperty(formData, 'form', {
get() {
return formData;
get form() {
return this;
},
configurable: true,
enumerable: true,
});
};

return formData as MockedFormData;
};
Expand Down

0 comments on commit 2851520

Please sign in to comment.