mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(upload-automation): harden android and electron failure handling
Updated Android/Electron upload paths to fail deterministically and report consistent stage details, while removing unsafe stage casting and path/package mismatches. This keeps postimages automation behavior intact and makes failures easier to diagnose.
This commit is contained in:
@@ -19,9 +19,11 @@ describe('media-upload-automation', () => {
|
||||
expect(isDirectMediaUrl('https://example.com/video.mp4')).toBe(true);
|
||||
});
|
||||
|
||||
it('strips query strings before checking', () => {
|
||||
it('strips query strings and fragments before checking', () => {
|
||||
expect(isDirectMediaUrl('https://i.imgur.com/abc.png?size=large')).toBe(true);
|
||||
expect(isDirectMediaUrl('https://imgur.com/page.html?img=photo.jpg')).toBe(false);
|
||||
expect(isDirectMediaUrl('https://i.imgur.com/abc.png#fragment')).toBe(true);
|
||||
expect(isDirectMediaUrl('https://i.postimg.cc/xyz.webp#')).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false for non-direct URLs (guards against non-media pages)', () => {
|
||||
|
||||
Reference in New Issue
Block a user