@vex-chat/libvex 6.1.5 → 6.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vex-chat/libvex",
3
- "version": "6.1.5",
3
+ "version": "6.1.6",
4
4
  "description": "Library for communicating with xchat server.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -404,6 +404,30 @@ export function platformSuite(
404
404
  await client.me.setAvatar(testImage);
405
405
  expect(true).toBe(true);
406
406
  });
407
+
408
+ test("avatar upload via JSON fallback path", async () => {
409
+ const globalWithFormData = globalThis as typeof globalThis & {
410
+ FormData?: unknown;
411
+ };
412
+ const originalFormData = globalWithFormData.FormData;
413
+ Object.defineProperty(globalThis, "FormData", {
414
+ configurable: true,
415
+ enumerable: true,
416
+ value: undefined,
417
+ writable: true,
418
+ });
419
+ try {
420
+ await client.me.setAvatar(testImage);
421
+ expect(true).toBe(true);
422
+ } finally {
423
+ Object.defineProperty(globalThis, "FormData", {
424
+ configurable: true,
425
+ enumerable: true,
426
+ value: originalFormData,
427
+ writable: true,
428
+ });
429
+ }
430
+ });
407
431
  });
408
432
  }
409
433