mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-14 11:00:03 -04:00
Update database/update.js
This commit is contained in:
parent
682824a45d
commit
bb8baf348a
3 changed files with 70 additions and 63 deletions
|
@ -8,14 +8,29 @@ beforeEach(() => {
|
|||
'tests/__data__/input/database/db_update.streams.db',
|
||||
'tests/__data__/output/streams.db'
|
||||
)
|
||||
})
|
||||
|
||||
it('can save results', () => {
|
||||
const stdout = execSync(
|
||||
'DB_DIR=tests/__data__/output LOGS_DIR=tests/__data__/input/logs/cluster/load npm run db:update',
|
||||
{ encoding: 'utf8' }
|
||||
)
|
||||
})
|
||||
expect(stdout).toEqual(`
|
||||
> db:update
|
||||
> node scripts/commands/database/update.js
|
||||
|
||||
loading streams...
|
||||
found 7 streams
|
||||
loading check results...
|
||||
found 6 results
|
||||
loading origins...
|
||||
found 2 origins
|
||||
updating streams...
|
||||
updated 6 streams
|
||||
removed 1 duplicates
|
||||
done
|
||||
`)
|
||||
|
||||
it('can save results', () => {
|
||||
expect(content('tests/__data__/output/streams.db')).toEqual(
|
||||
content('tests/__data__/expected/database/db_update.streams.db')
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue