chore: sort errors down
This commit is contained in:
parent
df60013e16
commit
d6e29185e5
3 changed files with 58 additions and 0 deletions
|
|
@ -123,6 +123,15 @@ describe('resolve', () => {
|
|||
countryCodes: [CountryCode.de],
|
||||
},
|
||||
},
|
||||
{
|
||||
url: new URL('https://working2.com'),
|
||||
format: Format.hls,
|
||||
label: 'working1',
|
||||
sourceId: 'hostercom',
|
||||
meta: {
|
||||
countryCodes: [CountryCode.de],
|
||||
},
|
||||
},
|
||||
{
|
||||
url: new URL('https://example.com'),
|
||||
format: Format.unknown,
|
||||
|
|
@ -145,6 +154,15 @@ describe('resolve', () => {
|
|||
countryCodes: [CountryCode.de],
|
||||
},
|
||||
},
|
||||
{
|
||||
url: new URL('https://working1.com'),
|
||||
format: Format.hls,
|
||||
label: 'working2',
|
||||
sourceId: 'hostercom',
|
||||
meta: {
|
||||
countryCodes: [CountryCode.de],
|
||||
},
|
||||
},
|
||||
{
|
||||
url: new URL('https://example2.com'),
|
||||
format: Format.unknown,
|
||||
|
|
|
|||
|
|
@ -90,6 +90,10 @@ export class StreamResolver {
|
|||
return bytesComparison;
|
||||
}
|
||||
|
||||
if (a.error || b.error) {
|
||||
return a.error ? 1 : -1;
|
||||
}
|
||||
|
||||
if (a.isExternal || b.isExternal) {
|
||||
return a.isExternal ? 1 : -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,24 @@
|
|||
exports[`resolve adds error info 1`] = `
|
||||
{
|
||||
"streams": [
|
||||
{
|
||||
"behaviorHints": {
|
||||
"bingeGroup": "webstreamr-hostercom",
|
||||
"notWebReady": true,
|
||||
},
|
||||
"name": "WebStreamr 🇩🇪",
|
||||
"title": "🔗 working1",
|
||||
"url": "https://working2.com/",
|
||||
},
|
||||
{
|
||||
"behaviorHints": {
|
||||
"bingeGroup": "webstreamr-hostercom",
|
||||
"notWebReady": true,
|
||||
},
|
||||
"name": "WebStreamr 🇩🇪",
|
||||
"title": "🔗 working2",
|
||||
"url": "https://working1.com/",
|
||||
},
|
||||
{
|
||||
"behaviorHints": {
|
||||
"notWebReady": true,
|
||||
|
|
@ -91,6 +109,24 @@ exports[`resolve adds error info 1`] = `
|
|||
exports[`resolve adds error info 2`] = `
|
||||
{
|
||||
"streams": [
|
||||
{
|
||||
"behaviorHints": {
|
||||
"bingeGroup": "webstreamr-hostercom",
|
||||
"notWebReady": true,
|
||||
},
|
||||
"name": "WebStreamr 🇩🇪",
|
||||
"title": "🔗 working1",
|
||||
"url": "https://working2.com/",
|
||||
},
|
||||
{
|
||||
"behaviorHints": {
|
||||
"bingeGroup": "webstreamr-hostercom",
|
||||
"notWebReady": true,
|
||||
},
|
||||
"name": "WebStreamr 🇩🇪",
|
||||
"title": "🔗 working2",
|
||||
"url": "https://working1.com/",
|
||||
},
|
||||
{
|
||||
"behaviorHints": {
|
||||
"notWebReady": true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue