mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 02:47:02 -05:00
Update create.test.js
This commit is contained in:
@@ -6,7 +6,7 @@ beforeEach(() => {
|
|||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
|
|
||||||
const stdout = execSync(
|
const stdout = execSync(
|
||||||
'DB_DIR=tests/__data__/output/database CHANNELS_PATH=tests/__data__/input/sites/example.com_*.channels.xml DATA_DIR=tests/__data__/input/data npm run queue:create -- --max-clusters=1 --days=2',
|
'DB_DIR=tests/__data__/output/database CHANNELS_PATH=tests/__data__/input/sites/example.com_*.channels.xml DATA_DIR=tests/__data__/input/data CURR_DATE=2022-12-29 npm run queue:create -- --max-clusters=1',
|
||||||
{ encoding: 'utf8' }
|
{ encoding: 'utf8' }
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@@ -17,19 +17,19 @@ it('can create queue', () => {
|
|||||||
|
|
||||||
output = output.map(i => {
|
output = output.map(i => {
|
||||||
i._id = null
|
i._id = null
|
||||||
i.date = null
|
|
||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
expected = expected.map(i => {
|
expected = expected.map(i => {
|
||||||
i._id = null
|
i._id = null
|
||||||
i.date = null
|
|
||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(output).toEqual(
|
expect(output).toEqual(
|
||||||
expect.arrayContaining([
|
expect.arrayContaining([
|
||||||
expect.objectContaining(expected[0]),
|
expect.objectContaining(expected[0]),
|
||||||
expect.objectContaining(expected[1])
|
expect.objectContaining(expected[1]),
|
||||||
|
expect.objectContaining(expected[2]),
|
||||||
|
expect.objectContaining(expected[3])
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user