mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-03 02:11:07 +05:30
1. ThemeSettings: change 'auto' radio value to 'system' to match the v5 settingsSchema enum. Storing 'auto' silently wipes all settings on next launch. 2. UpdateBanner: render an 'available' branch so users see a CTA when a new version is detected (the store already had this state, but the banner was silent). Added a test. 3. feed-config: remove the unused resolveFeedUrl / FEEDS exports. feedConfigFor is the actual implementation used by the IPC handler. Updated tests to match. 4. main/index.js: tighten app:open-external regex to https:// only.
19 lines
791 B
JavaScript
19 lines
791 B
JavaScript
const { feedConfigFor } = require('../../../../src/main/updater/feed-config');
|
|
|
|
describe('feedConfigFor', () => {
|
|
test('returns github provider config for github channel', () => {
|
|
const config = feedConfigFor('github');
|
|
expect(config).toEqual({ provider: 'github', owner: 'amitwh', repo: 'markdown-converter' });
|
|
});
|
|
|
|
test('returns generic provider config for concreteinfo channel', () => {
|
|
const config = feedConfigFor('concreteinfo');
|
|
expect(config).toEqual({ provider: 'generic', url: 'https://updates.concreteinfo.co.in/v5' });
|
|
});
|
|
|
|
test('falls back to generic provider on unknown channel', () => {
|
|
const config = feedConfigFor('something-weird');
|
|
expect(config).toEqual({ provider: 'generic', url: 'https://updates.concreteinfo.co.in/v5' });
|
|
});
|
|
});
|