chore(manifest): sort sources for each language in configuration
This commit is contained in:
parent
3aff950598
commit
491df54242
3 changed files with 8 additions and 6 deletions
|
|
@ -36,7 +36,7 @@ exports[`buildManifest default manifest 1`] = `
|
|||
},
|
||||
{
|
||||
"key": "it",
|
||||
"title": "Italian 🇮🇹 (VixSrc, Eurostreaming, MostraGuarda)",
|
||||
"title": "Italian 🇮🇹 (Eurostreaming, MostraGuarda, VixSrc)",
|
||||
"type": "checkbox",
|
||||
},
|
||||
{
|
||||
|
|
@ -84,7 +84,7 @@ exports[`buildManifest default manifest 1`] = `
|
|||
"movie",
|
||||
"series",
|
||||
],
|
||||
"version": "0.41.3",
|
||||
"version": Any<String>,
|
||||
}
|
||||
`;
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ exports[`buildManifest has checked source with appropriate config 1`] = `
|
|||
{
|
||||
"default": "checked",
|
||||
"key": "de",
|
||||
"title": "German 🇩🇪 (StreamKiste, MeineCloud)",
|
||||
"title": "German 🇩🇪 (MeineCloud, StreamKiste)",
|
||||
"type": "checkbox",
|
||||
},
|
||||
{
|
||||
|
|
@ -208,7 +208,7 @@ exports[`buildManifest has unchecked source without a config 1`] = `
|
|||
},
|
||||
{
|
||||
"key": "de",
|
||||
"title": "German 🇩🇪 (StreamKiste, MeineCloud)",
|
||||
"title": "German 🇩🇪 (MeineCloud, StreamKiste)",
|
||||
"type": "checkbox",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ describe('buildManifest', () => {
|
|||
test('default manifest', async () => {
|
||||
const manifest = buildManifest(createSources(fetcher), [], {});
|
||||
|
||||
expect(manifest).toMatchSnapshot();
|
||||
expect(manifest).toMatchSnapshot({
|
||||
version: expect.any(String),
|
||||
});
|
||||
});
|
||||
|
||||
test('has unchecked source without a config', () => {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export const buildManifest = (sources: Source[], extractors: Extractor[], config
|
|||
manifest.config.push({
|
||||
key: countryCode,
|
||||
type: 'checkbox',
|
||||
title: `${language} ${flagFromCountryCode(countryCode)} (${(sources as Source[]).map(handler => handler.label).join(', ')})`,
|
||||
title: `${language} ${flagFromCountryCode(countryCode)} (${(sources as Source[]).map(handler => handler.label).sort().join(', ')})`,
|
||||
...(countryCode in config && { default: 'checked' }),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue