Update database/create.js

This commit is contained in:
Aleksandr Statciuk
2022-02-13 03:04:25 +03:00
parent 9adfe9a07d
commit 8f0e9f14ae
3 changed files with 17 additions and 17 deletions

View File

@@ -0,0 +1,4 @@
{"channel":null,"title":"ABC (720p)","filepath":"tests/__data__/input/channels/wrong_id.m3u","url":"https://example.com/playlist2.m3u8","http_referrer":"","user_agent":"","cluster_id":1,"_id":"hrkAABqRIoVtOXd4"}
{"channel":null,"title":"Fox Sports 2 Asia (Thai) (720p)","filepath":"tests/__data__/input/channels/us_blocked.m3u","url":"https://example.com/playlist.m3u8","http_referrer":"","user_agent":"","cluster_id":1,"_id":"eeofJMxX7fOzDR9R"}
{"channel":null,"title":"1A Network (720p)","filepath":"tests/__data__/input/channels/unsorted.m3u","url":"https://simultv.s.llnwi.net/n4s4/2ANetwork/interlink.m3u8","http_referrer":"","user_agent":"","cluster_id":1,"_id":"omQ1KYCOKqb5Lxyn"}
{"channel":"ATV.ad","title":"ATV (720p) [Offline]","filepath":"tests/__data__/input/channels/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":"","user_agent":"","cluster_id":1,"_id":"v9O0SiMdhSh7wiKB"}

View File

@@ -13,7 +13,7 @@ beforeEach(() => {
it('can create database', () => {
let output = content('tests/__data__/output/database/streams.db')
let expected = content('tests/__data__/expected/database/streams.db')
let expected = content('tests/__data__/expected/database/db_create.streams.db')
output = output.map(i => {
i._id = null
@@ -28,7 +28,8 @@ it('can create database', () => {
expect.arrayContaining([
expect.objectContaining(expected[0]),
expect.objectContaining(expected[1]),
expect.objectContaining(expected[2])
expect.objectContaining(expected[2]),
expect.objectContaining(expected[3])
])
)
})