mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(media hosting): add imgbb provider
This commit is contained in:
@@ -19,14 +19,23 @@ describe('useMediaHostingStore', () => {
|
||||
|
||||
it('exports MEDIA_HOSTING_PROVIDERS with ids, labels, homepage URLs, runtime metadata', () => {
|
||||
expect(MEDIA_HOSTING_PROVIDERS).toBeDefined();
|
||||
expect(MEDIA_HOSTING_PROVIDERS.length).toBe(2);
|
||||
expect(MEDIA_HOSTING_PROVIDERS.length).toBe(3);
|
||||
const catbox = MEDIA_HOSTING_PROVIDERS.find((p) => p.id === 'catbox');
|
||||
expect(catbox).toEqual({
|
||||
id: 'catbox',
|
||||
label: 'Catbox',
|
||||
homepageUrl: 'https://catbox.moe',
|
||||
availabilityProbeUrls: ['https://catbox.moe/pictures/logo.png', 'https://files.catbox.moe/8ten4y.png'],
|
||||
supportedRuntimes: ['web', 'electron', 'android'],
|
||||
});
|
||||
const imgbb = MEDIA_HOSTING_PROVIDERS.find((p) => p.id === 'imgbb');
|
||||
expect(imgbb).toEqual({
|
||||
id: 'imgbb',
|
||||
label: 'ImgBB',
|
||||
homepageUrl: 'https://imgbb.com',
|
||||
availabilityProbeUrls: ['https://simgbb.com/images/logo.png', 'https://i.ibb.co/7Jsq00V5/spoiler.png'],
|
||||
supportedRuntimes: ['electron', 'android'],
|
||||
});
|
||||
});
|
||||
|
||||
it('defaults uploadMode to random and preferredProvider to catbox', () => {
|
||||
|
||||
Reference in New Issue
Block a user