Skip to content

Commit 7423f1a

Browse files
fix: add form._getAppendedData to FormData mock
1 parent 31c68c3 commit 7423f1a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/resources/drafts.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jest.mock('formdata-node', () => {
1919
}
2020
};
2121
this._getAppendedData = () => appendedData;
22+
// Ensure the form property also has access to _getAppendedData
23+
(this as any).form = {
24+
_getAppendedData: () => appendedData
25+
};
2226
return this;
2327
}),
2428
File: jest.fn().mockImplementation((content: any[], name: string) => ({

0 commit comments

Comments
 (0)