mirror of
https://github.com/iptv-org/database.git
synced 2024-11-09 14:16:38 -05:00
Add tests data
This commit is contained in:
parent
37eeffd8b0
commit
d5e243aca4
22 changed files with 680 additions and 0 deletions
1
tests/__data__/expected/api/blocklist.json
Normal file
1
tests/__data__/expected/api/blocklist.json
Normal file
|
@ -0,0 +1 @@
|
|||
[{"channel":"AnimalPlanetAfrica.za","ref":"https://github.com/iptv-org/iptv/issues/1831"}]
|
1
tests/__data__/expected/api/channels.json
Normal file
1
tests/__data__/expected/api/channels.json
Normal file
|
@ -0,0 +1 @@
|
|||
[{"id":"002RadioTV.do","name":"002 Radio TV","alt_names":[],"network":null,"owners":[],"country":"DO","subdivision":null,"city":null,"broadcast_area":["c/DO"],"languages":["spa"],"categories":["general"],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"https://www.002radio.com/","logo":"https://i.imgur.com/7oNe8xj.png"},{"id":"BeijingSatelliteTV.cn","name":"Beijing Satellite TV","alt_names":["北京卫视"],"network":null,"owners":[],"country":"CN","subdivision":null,"city":"Beijing","broadcast_area":["c/CN"],"languages":["zho"],"categories":["general"],"is_nsfw":false,"launched":"1979-05-16","closed":null,"replaced_by":null,"website":"https://www.brtn.cn/btv/","logo":"https://i.imgur.com/vsktAez.png"},{"id":"M5.hu","name":"M5","alt_names":[],"network":null,"owners":[],"country":"HU","subdivision":null,"city":null,"broadcast_area":["c/HU"],"languages":["hun"],"categories":[],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"https://www.mediaklikk.hu/m5/","logo":"https://i.imgur.com/y21wFd0.png"}]
|
2
tests/__data__/expected/data/blocklist.csv
Normal file
2
tests/__data__/expected/data/blocklist.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
channel,ref
|
||||
HGTVHungary.hu,https://github.com/iptv-org/iptv/issues/1831
|
|
6
tests/__data__/expected/data/channels.csv
Normal file
6
tests/__data__/expected/data/channels.csv
Normal file
|
@ -0,0 +1,6 @@
|
|||
id,name,alt_names,network,owners,country,subdivision,city,broadcast_area,languages,categories,is_nsfw,launched,closed,replaced_by,website,logo
|
||||
beINMoviesTurk.tr,beIN Movies Turk,beIN Movies Türk,,,TR,,Beijing,c/TR,tur,movies,FALSE,1979-05-16,,,http://www.digiturk.com.tr/,https://i.imgur.com/nw8Sa2z.png
|
||||
M5.hu,M5,,,Duna Médiaszolgáltató Nonprofit Zrt.,HU,,,c/HU,hun,,FALSE,,,,https://www.mediaklikk.hu/m5/,https://i.imgur.com/y21wFd0.png
|
||||
WenzhouEconomicandEducation.cn,Wenzhou Economic and Education,,,,CN,,Wenzhou,c/CN,zho,science,FALSE,,,,,https://www.tvchinese.net/uploads/tv/wzjjkj.jpg
|
||||
YiwuBusinessChannel.cn,Yiwu Business Channel,,,,CN,,,c/CN,zho,business,FALSE,,,,,https://www.tvchinese.net/uploads/tv/yiwutv.jpg
|
||||
YiwuNewsIntegratedChannel.cn,Yiwu News Integrated Channel,,,,CN,,,c/CN,zho,news,FALSE,,,,,https://www.tvchinese.net/uploads/tv/yiwutv.jpg
|
|
2
tests/__data__/input/data/blocklist.csv
Normal file
2
tests/__data__/input/data/blocklist.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
channel,ref
|
||||
AnimalPlanetAfrica.za,https://github.com/iptv-org/iptv/issues/1831
|
|
4
tests/__data__/input/data/channels.csv
Normal file
4
tests/__data__/input/data/channels.csv
Normal file
|
@ -0,0 +1,4 @@
|
|||
id,name,alt_names,network,owners,country,subdivision,city,broadcast_area,languages,categories,is_nsfw,launched,closed,replaced_by,website,logo
|
||||
002RadioTV.do,002 Radio TV,,,,DO,,,c/DO,spa,general,FALSE,,,,https://www.002radio.com/,https://i.imgur.com/7oNe8xj.png
|
||||
BeijingSatelliteTV.cn,Beijing Satellite TV,北京卫视,,,CN,,Beijing,c/CN,zho,general,FALSE,1979-05-16,,,https://www.brtn.cn/btv/,https://i.imgur.com/vsktAez.png
|
||||
M5.hu,M5,,,,HU,,,c/HU,hun,,FALSE,,,,https://www.mediaklikk.hu/m5/,https://i.imgur.com/y21wFd0.png
|
|
81
tests/__data__/input/issues/blocklist_add_approved.js
Normal file
81
tests/__data__/input/issues/blocklist_add_approved.js
Normal file
|
@ -0,0 +1,81 @@
|
|||
module.exports = [
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5897',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5897/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5897/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5897/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5897',
|
||||
id: 1929261634,
|
||||
node_id: 'I_kwDOG1Kwp85y_jJC',
|
||||
number: 5897,
|
||||
title: 'Block: HGTV Hungary',
|
||||
user: {
|
||||
login: 'freearhey',
|
||||
id: 7253922,
|
||||
node_id: 'MDQ6VXNlcjcyNTM5MjI=',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/7253922?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/freearhey',
|
||||
html_url: 'https://github.com/freearhey',
|
||||
followers_url: 'https://api.github.com/users/freearhey/followers',
|
||||
following_url: 'https://api.github.com/users/freearhey/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/freearhey/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/freearhey/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/freearhey/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/freearhey/orgs',
|
||||
repos_url: 'https://api.github.com/users/freearhey/repos',
|
||||
events_url: 'https://api.github.com/users/freearhey/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/freearhey/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
},
|
||||
{
|
||||
id: 6049155772,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABaI7KvA',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/blocklist:add',
|
||||
name: 'blocklist:add',
|
||||
color: 'e99695',
|
||||
default: false,
|
||||
description: 'Request to add a channel to the blocklist'
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T00:35:32Z',
|
||||
updated_at: '2023-10-06T00:35:32Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel ID\n\nHGTVHungary.hu\n\n### Reference\n\nhttps://github.com/iptv-org/iptv/issues/1831\n\n### Notes (optional)\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5897/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5897/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
}
|
||||
]
|
81
tests/__data__/input/issues/blocklist_remove_approved.js
Normal file
81
tests/__data__/input/issues/blocklist_remove_approved.js
Normal file
|
@ -0,0 +1,81 @@
|
|||
module.exports = [
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5891',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5891/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5891/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5891/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5891',
|
||||
id: 1929261634,
|
||||
node_id: 'I_kwDOG1Kwp85y_jJC',
|
||||
number: 5891,
|
||||
title: 'Unblock: Animal Planet Africa',
|
||||
user: {
|
||||
login: 'freearhey',
|
||||
id: 7253922,
|
||||
node_id: 'MDQ6VXNlcjcyNTM5MjI=',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/7253922?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/freearhey',
|
||||
html_url: 'https://github.com/freearhey',
|
||||
followers_url: 'https://api.github.com/users/freearhey/followers',
|
||||
following_url: 'https://api.github.com/users/freearhey/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/freearhey/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/freearhey/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/freearhey/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/freearhey/orgs',
|
||||
repos_url: 'https://api.github.com/users/freearhey/repos',
|
||||
events_url: 'https://api.github.com/users/freearhey/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/freearhey/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
},
|
||||
{
|
||||
id: 6049155772,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABaI7KvA',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/blocklist:add',
|
||||
name: 'blocklist:remove',
|
||||
color: 'e99695',
|
||||
default: false,
|
||||
description: 'Request to remove a channel from the blocklist'
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T00:35:32Z',
|
||||
updated_at: '2023-10-06T00:35:32Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel ID\n\nAnimalPlanetAfrica.za\n\n### Reason\n\nOther\n\n### Notes (optional)\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5891/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5891/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
}
|
||||
]
|
239
tests/__data__/input/issues/channels_add_approved.js
Normal file
239
tests/__data__/input/issues/channels_add_approved.js
Normal file
|
@ -0,0 +1,239 @@
|
|||
module.exports = [
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5900',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5900/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5900/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5900/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5900',
|
||||
id: 1929321995,
|
||||
node_id: 'I_kwDOG1Kwp85y_x4L',
|
||||
number: 5900,
|
||||
title: 'Add: Yiwu News Integrated Channel',
|
||||
user: {
|
||||
login: 'AntiPontifex',
|
||||
id: 81566772,
|
||||
node_id: 'MDQ6VXNlcjgxNTY2Nzcy',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/81566772?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/AntiPontifex',
|
||||
html_url: 'https://github.com/AntiPontifex',
|
||||
followers_url: 'https://api.github.com/users/AntiPontifex/followers',
|
||||
following_url: 'https://api.github.com/users/AntiPontifex/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/AntiPontifex/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/AntiPontifex/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/AntiPontifex/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/AntiPontifex/orgs',
|
||||
repos_url: 'https://api.github.com/users/AntiPontifex/repos',
|
||||
events_url: 'https://api.github.com/users/AntiPontifex/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/AntiPontifex/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5303575699,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABPB4kkw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/channels:add',
|
||||
name: 'channels:add',
|
||||
color: '017ff8',
|
||||
default: false,
|
||||
description: 'Request to add a channel into the database'
|
||||
},
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T02:10:41Z',
|
||||
updated_at: '2023-10-06T02:52:02Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel Name\n\nYiwu News Integrated Channel\n\n### Alternative Names (optional)\n\n_No response_\n\n### Network (optional)\n\n_No response_\n\n### Owners (optional)\n\n_No response_\n\n### Country\n\nCN\n\n### Subdivision (optional)\n\n_No response_\n\n### City (optional)\n\n_No response_\n\n### Broadcast Area\n\nc/CN\n\n### Languages\n\nzho\n\n### Categories (optional)\n\nnews\n\n### NSFW\n\nFALSE\n\n### Launched (optional)\n\n_No response_\n\n### Closed (optional)\n\n_No response_\n\n### Replaced By (optional)\n\n_No response_\n\n### Website (optional)\n\n_No response_\n\n### Logo\n\nhttps://www.tvchinese.net/uploads/tv/yiwutv.jpg\n\n### Notes\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5900/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5900/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
},
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5899',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5899/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5899/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5899/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5899',
|
||||
id: 1929318573,
|
||||
node_id: 'I_kwDOG1Kwp85y_xCt',
|
||||
number: 5899,
|
||||
title: 'Add: Yiwu Business Channel',
|
||||
user: {
|
||||
login: 'AntiPontifex',
|
||||
id: 81566772,
|
||||
node_id: 'MDQ6VXNlcjgxNTY2Nzcy',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/81566772?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/AntiPontifex',
|
||||
html_url: 'https://github.com/AntiPontifex',
|
||||
followers_url: 'https://api.github.com/users/AntiPontifex/followers',
|
||||
following_url: 'https://api.github.com/users/AntiPontifex/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/AntiPontifex/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/AntiPontifex/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/AntiPontifex/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/AntiPontifex/orgs',
|
||||
repos_url: 'https://api.github.com/users/AntiPontifex/repos',
|
||||
events_url: 'https://api.github.com/users/AntiPontifex/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/AntiPontifex/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5303575699,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABPB4kkw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/channels:add',
|
||||
name: 'channels:add',
|
||||
color: '017ff8',
|
||||
default: false,
|
||||
description: 'Request to add a channel into the database'
|
||||
},
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T02:05:11Z',
|
||||
updated_at: '2023-10-06T02:51:46Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel Name\n\nYiwu Business Channel\n\n### Alternative Names (optional)\n\n_No response_\n\n### Network (optional)\n\n_No response_\n\n### Owners (optional)\n\n_No response_\n\n### Country\n\nCN\n\n### Subdivision (optional)\n\n_No response_\n\n### City (optional)\n\n_No response_\n\n### Broadcast Area\n\nc/CN\n\n### Languages\n\nzho\n\n### Categories (optional)\n\nbusiness\n\n### NSFW\n\nFALSE\n\n### Launched (optional)\n\n_No response_\n\n### Closed (optional)\n\n_No response_\n\n### Replaced By (optional)\n\n_No response_\n\n### Website (optional)\n\n_No response_\n\n### Logo\n\nhttps://www.tvchinese.net/uploads/tv/yiwutv.jpg\n\n### Notes\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5899/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5899/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
},
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5898',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5898/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5898/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5898/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5898',
|
||||
id: 1929313117,
|
||||
node_id: 'I_kwDOG1Kwp85y_vtd',
|
||||
number: 5898,
|
||||
title: 'Add: Wenzhou Economic and Education',
|
||||
user: {
|
||||
login: 'AntiPontifex',
|
||||
id: 81566772,
|
||||
node_id: 'MDQ6VXNlcjgxNTY2Nzcy',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/81566772?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/AntiPontifex',
|
||||
html_url: 'https://github.com/AntiPontifex',
|
||||
followers_url: 'https://api.github.com/users/AntiPontifex/followers',
|
||||
following_url: 'https://api.github.com/users/AntiPontifex/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/AntiPontifex/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/AntiPontifex/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/AntiPontifex/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/AntiPontifex/orgs',
|
||||
repos_url: 'https://api.github.com/users/AntiPontifex/repos',
|
||||
events_url: 'https://api.github.com/users/AntiPontifex/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/AntiPontifex/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5303575699,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABPB4kkw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/channels:add',
|
||||
name: 'channels:add',
|
||||
color: '017ff8',
|
||||
default: false,
|
||||
description: 'Request to add a channel into the database'
|
||||
},
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T01:56:32Z',
|
||||
updated_at: '2023-10-06T02:51:22Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel Name\n\nWenzhou Economic and Education\n\n### Alternative Names (optional)\n\n_No response_\n\n### Network (optional)\n\n_No response_\n\n### Owners (optional)\n\n_No response_\n\n### Country\n\nCN\n\n### Subdivision (optional)\n\n_No response_\n\n### City (optional)\n\nWenzhou\n\n### Broadcast Area\n\nc/CN\n\n### Languages\n\nzho\n\n### Categories (optional)\n\nscience\n\n### NSFW\n\nFALSE\n\n### Launched (optional)\n\n_No response_\n\n### Closed (optional)\n\n_No response_\n\n### Replaced By (optional)\n\n_No response_\n\n### Website (optional)\n\n_No response_\n\n### Logo\n\nhttps://www.tvchinese.net/uploads/tv/wzjjkj.jpg\n\n### Notes\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5898/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5898/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
}
|
||||
]
|
160
tests/__data__/input/issues/channels_edit_approved.js
Normal file
160
tests/__data__/input/issues/channels_edit_approved.js
Normal file
|
@ -0,0 +1,160 @@
|
|||
module.exports = [
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5901',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5901/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5901/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5901/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5901',
|
||||
id: 1929459171,
|
||||
node_id: 'I_kwDOG1Kwp85zATXj',
|
||||
number: 5901,
|
||||
title: 'Edit: M5',
|
||||
user: {
|
||||
login: 'freearhey',
|
||||
id: 7253922,
|
||||
node_id: 'MDQ6VXNlcjcyNTM5MjI=',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/7253922?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/freearhey',
|
||||
html_url: 'https://github.com/freearhey',
|
||||
followers_url: 'https://api.github.com/users/freearhey/followers',
|
||||
following_url: 'https://api.github.com/users/freearhey/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/freearhey/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/freearhey/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/freearhey/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/freearhey/orgs',
|
||||
repos_url: 'https://api.github.com/users/freearhey/repos',
|
||||
events_url: 'https://api.github.com/users/freearhey/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/freearhey/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5303574335,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABPB4fPw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/channels:edit',
|
||||
name: 'channels:edit',
|
||||
color: 'E12977',
|
||||
default: false,
|
||||
description: 'Request to edit channel description'
|
||||
},
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T05:25:44Z',
|
||||
updated_at: '2023-10-06T05:25:44Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel ID (required)\n\nM5.hu\n\n### Channel Name\n\n_No response_\n\n### Alternative Names\n\n_No response_\n\n### Network\n\n_No response_\n\n### Owners\n\nDuna Médiaszolgáltató Nonprofit Zrt.\n\n### Country\n\n_No response_\n\n### Subdivision\n\n_No response_\n\n### City\n\n_No response_\n\n### Broadcast Area\n\n_No response_\n\n### Languages\n\n_No response_\n\n### Categories\n\n_No response_\n\n### NSFW\n\nFALSE\n\n### Launched\n\n_No response_\n\n### Closed\n\n_No response_\n\n### Replaced By\n\n_No response_\n\n### Website\n\n_No response_\n\n### Logo\n\n_No response_\n\n### Notes\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5901/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5901/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
},
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5701',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5701/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5701/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5701/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5701',
|
||||
id: 1929459171,
|
||||
node_id: 'I_kwDOG1Kwp85zATXj',
|
||||
number: 5701,
|
||||
title: 'Edit: M5',
|
||||
user: {
|
||||
login: 'freearhey',
|
||||
id: 7253922,
|
||||
node_id: 'MDQ6VXNlcjcyNTM5MjI=',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/7253922?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/freearhey',
|
||||
html_url: 'https://github.com/freearhey',
|
||||
followers_url: 'https://api.github.com/users/freearhey/followers',
|
||||
following_url: 'https://api.github.com/users/freearhey/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/freearhey/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/freearhey/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/freearhey/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/freearhey/orgs',
|
||||
repos_url: 'https://api.github.com/users/freearhey/repos',
|
||||
events_url: 'https://api.github.com/users/freearhey/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/freearhey/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5303574335,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABPB4fPw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/channels:edit',
|
||||
name: 'channels:edit',
|
||||
color: 'E12977',
|
||||
default: false,
|
||||
description: 'Request to edit channel description'
|
||||
},
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T05:25:44Z',
|
||||
updated_at: '2023-10-06T05:25:44Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel ID (required)\n\nBeijingSatelliteTV.cn\n\n### Channel Name\n\nbeIN Movies Turk\n\n### Alternative Names\n\nbeIN Movies Türk\n\n### Network\n\n_No response_\n\n### Owners\n\n_No response_\n\n### Country\n\nTR\n\n### Subdivision\n\n_No response_\n\n### City\n\n_No response_\n\n### Broadcast Area\n\nc/TR\n\n### Languages\n\ntur\n\n### Categories\n\nmovies\n\n### NSFW\n\nFALSE\n\n### Launched\n\n1979-05-16\n\n### Closed\n\n_No response_\n\n### Replaced By\n\n_No response_\n\n### Website\n\nhttp://www.digiturk.com.tr/\n\n### Logo\n\nhttps://i.imgur.com/nw8Sa2z.png\n\n### Notes\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5701/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5701/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
}
|
||||
]
|
81
tests/__data__/input/issues/channels_remove_approved.js
Normal file
81
tests/__data__/input/issues/channels_remove_approved.js
Normal file
|
@ -0,0 +1,81 @@
|
|||
module.exports = [
|
||||
{
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5871',
|
||||
repository_url: 'https://api.github.com/repos/iptv-org/database',
|
||||
labels_url: 'https://api.github.com/repos/iptv-org/database/issues/5871/labels{/name}',
|
||||
comments_url: 'https://api.github.com/repos/iptv-org/database/issues/5871/comments',
|
||||
events_url: 'https://api.github.com/repos/iptv-org/database/issues/5871/events',
|
||||
html_url: 'https://github.com/iptv-org/database/issues/5871',
|
||||
id: 1929261634,
|
||||
node_id: 'I_kwDOG1Kwp85y_jJC',
|
||||
number: 5871,
|
||||
title: 'Remove: 002 Radio TV',
|
||||
user: {
|
||||
login: 'freearhey',
|
||||
id: 7253922,
|
||||
node_id: 'MDQ6VXNlcjcyNTM5MjI=',
|
||||
avatar_url: 'https://avatars.githubusercontent.com/u/7253922?v=4',
|
||||
gravatar_id: '',
|
||||
url: 'https://api.github.com/users/freearhey',
|
||||
html_url: 'https://github.com/freearhey',
|
||||
followers_url: 'https://api.github.com/users/freearhey/followers',
|
||||
following_url: 'https://api.github.com/users/freearhey/following{/other_user}',
|
||||
gists_url: 'https://api.github.com/users/freearhey/gists{/gist_id}',
|
||||
starred_url: 'https://api.github.com/users/freearhey/starred{/owner}{/repo}',
|
||||
subscriptions_url: 'https://api.github.com/users/freearhey/subscriptions',
|
||||
organizations_url: 'https://api.github.com/users/freearhey/orgs',
|
||||
repos_url: 'https://api.github.com/users/freearhey/repos',
|
||||
events_url: 'https://api.github.com/users/freearhey/events{/privacy}',
|
||||
received_events_url: 'https://api.github.com/users/freearhey/received_events',
|
||||
type: 'User',
|
||||
site_admin: false
|
||||
},
|
||||
labels: [
|
||||
{
|
||||
id: 5366738347,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/approved',
|
||||
name: 'approved',
|
||||
color: '85DDDE',
|
||||
default: false,
|
||||
description: ''
|
||||
},
|
||||
{
|
||||
id: 6049155772,
|
||||
node_id: 'LA_kwDOG1Kwp88AAAABaI7KvA',
|
||||
url: 'https://api.github.com/repos/iptv-org/database/labels/blocklist:add',
|
||||
name: 'channels:remove',
|
||||
color: 'e99695',
|
||||
default: false,
|
||||
description: 'Request to remove a channel'
|
||||
}
|
||||
],
|
||||
state: 'open',
|
||||
locked: false,
|
||||
assignee: null,
|
||||
assignees: [],
|
||||
milestone: null,
|
||||
comments: 0,
|
||||
created_at: '2023-10-06T00:35:32Z',
|
||||
updated_at: '2023-10-06T00:35:32Z',
|
||||
closed_at: null,
|
||||
author_association: 'CONTRIBUTOR',
|
||||
active_lock_reason: null,
|
||||
body: '### Channel ID\n\n002RadioTV.do\n\n### Reason\n\nOther\n\n### Notes (optional)\n\n_No response_',
|
||||
reactions: {
|
||||
url: 'https://api.github.com/repos/iptv-org/database/issues/5871/reactions',
|
||||
total_count: 0,
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
laugh: 0,
|
||||
hooray: 0,
|
||||
confused: 0,
|
||||
heart: 0,
|
||||
rocket: 0,
|
||||
eyes: 0
|
||||
},
|
||||
timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/5871/timeline',
|
||||
performed_via_github_app: null,
|
||||
state_reason: null
|
||||
}
|
||||
]
|
3
tests/__data__/input/validate/duplicate/categories.csv
Normal file
3
tests/__data__/input/validate/duplicate/categories.csv
Normal file
|
@ -0,0 +1,3 @@
|
|||
id,name
|
||||
aaa,AAA
|
||||
aaa,BBB
|
|
1
tests/__data__/input/validate/empty_line/channels.csv
Normal file
1
tests/__data__/input/validate/empty_line/channels.csv
Normal file
|
@ -0,0 +1 @@
|
|||
id,name,alt_names,network,owners,country,subdivision,city,broadcast_area,languages,categories,is_nsfw,launched,closed,replaced_by,website,logo
|
|
|
@ -0,0 +1,2 @@
|
|||
id,name
|
||||
aaa,AAA
|
|
|
@ -0,0 +1,2 @@
|
|||
channel,ref
|
||||
aaa.us,https://github.com/iptv-org/iptv/issues/1831
|
|
2
tests/__data__/input/validate/invalid_value/channels.csv
Normal file
2
tests/__data__/input/validate/invalid_value/channels.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
id,name,alt_names,network,owners,country,subdivision,city,broadcast_area,languages,categories,is_nsfw,launched,closed,replaced_by,website,logo
|
||||
002RadioTV.do,002 Radio TV,,,,DO,,,c/DO,spa,,FALSE,,,,https://www.002radio.com/,https://i.imgur.com/7oNe8xj.png
|
|
|
@ -0,0 +1,3 @@
|
|||
name,code,languages,flag
|
||||
Andorra,AD,cat,🇦🇩
|
||||
Dominican Republic,DO,spa,🇩🇴
|
|
|
@ -0,0 +1,3 @@
|
|||
code,name
|
||||
cat,Catalan
|
||||
spa,Spanish
|
|
|
@ -0,0 +1,2 @@
|
|||
country,name,code
|
||||
AD,Andorra la Vella,AD-07
|
|
|
@ -0,0 +1,2 @@
|
|||
id,name
|
||||
auto
|
|
1
tests/__data__/output/api/blocklist.json
Normal file
1
tests/__data__/output/api/blocklist.json
Normal file
|
@ -0,0 +1 @@
|
|||
[{"channel":"AnimalPlanetAfrica.za","ref":"https://github.com/iptv-org/iptv/issues/1831"}]
|
1
tests/__data__/output/api/channels.json
Normal file
1
tests/__data__/output/api/channels.json
Normal file
|
@ -0,0 +1 @@
|
|||
[{"id":"002RadioTV.do","name":"002 Radio TV","alt_names":[],"network":null,"owners":[],"country":"DO","subdivision":null,"city":null,"broadcast_area":["c/DO"],"languages":["spa"],"categories":["general"],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"https://www.002radio.com/","logo":"https://i.imgur.com/7oNe8xj.png"},{"id":"BeijingSatelliteTV.cn","name":"Beijing Satellite TV","alt_names":["北京卫视"],"network":null,"owners":[],"country":"CN","subdivision":null,"city":"Beijing","broadcast_area":["c/CN"],"languages":["zho"],"categories":["general"],"is_nsfw":false,"launched":"1979-05-16","closed":null,"replaced_by":null,"website":"https://www.brtn.cn/btv/","logo":"https://i.imgur.com/vsktAez.png"},{"id":"M5.hu","name":"M5","alt_names":[],"network":null,"owners":[],"country":"HU","subdivision":null,"city":null,"broadcast_area":["c/HU"],"languages":["hun"],"categories":[],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"https://www.mediaklikk.hu/m5/","logo":"https://i.imgur.com/y21wFd0.png"}]
|
Loading…
Reference in a new issue