mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update create-database.test.js
This commit is contained in:
parent
fea3aca787
commit
6568f77761
1 changed files with 28 additions and 26 deletions
|
@ -15,32 +15,34 @@ beforeEach(() => {
|
||||||
it('can create channels database', () => {
|
it('can create channels database', () => {
|
||||||
const output = content('tests/__data__/output/database/channels.db')
|
const output = content('tests/__data__/output/database/channels.db')
|
||||||
|
|
||||||
expect(output).toMatchObject([
|
expect(output).toEqual(
|
||||||
{
|
expect.arrayContaining([
|
||||||
lang: 'ru',
|
expect.objectContaining({
|
||||||
country: 'US',
|
lang: 'ru',
|
||||||
xmltv_id: 'CNNInternationalEurope.us',
|
country: 'US',
|
||||||
site_id: '140',
|
xmltv_id: 'CNNInternationalEurope.us',
|
||||||
name: 'CNN International Europe',
|
site_id: '140',
|
||||||
site: 'example.com',
|
name: 'CNN International Europe',
|
||||||
channelsPath: 'tests/__data__/input/sites/example.com_ca-nl.channels.xml',
|
site: 'example.com',
|
||||||
configPath: 'tests/__data__/input/sites/example.com.config.js',
|
channelsPath: 'tests/__data__/input/sites/example.com_ca-nl.channels.xml',
|
||||||
groups: ['ca-nl/example.com'],
|
configPath: 'tests/__data__/input/sites/example.com.config.js',
|
||||||
cluster_id: 1
|
groups: ['ca-nl/example.com'],
|
||||||
},
|
cluster_id: 1
|
||||||
{
|
}),
|
||||||
lang: 'en',
|
expect.objectContaining({
|
||||||
xmltv_id: 'CNNInternationalEurope2.us',
|
lang: 'en',
|
||||||
site_id: '141',
|
xmltv_id: 'CNNInternationalEurope2.us',
|
||||||
name: 'CNN International Europe 2',
|
site_id: '141',
|
||||||
site: 'example.com',
|
name: 'CNN International Europe 2',
|
||||||
country: 'US',
|
site: 'example.com',
|
||||||
channelsPath: 'tests/__data__/input/sites/example.com_ca-nl.channels.xml',
|
country: 'US',
|
||||||
configPath: 'tests/__data__/input/sites/example.com.config.js',
|
channelsPath: 'tests/__data__/input/sites/example.com_ca-nl.channels.xml',
|
||||||
groups: ['ca-nl/example.com'],
|
configPath: 'tests/__data__/input/sites/example.com.config.js',
|
||||||
cluster_id: 1
|
groups: ['ca-nl/example.com'],
|
||||||
}
|
cluster_id: 1
|
||||||
])
|
})
|
||||||
|
])
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
function content(filepath) {
|
function content(filepath) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue