Update tests

This commit is contained in:
freearhey
2023-09-18 18:24:13 +03:00
parent bce4cd2b18
commit 7ac9385292
2 changed files with 13 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ beforeEach(() => {
it('can format playlists', () => { it('can format playlists', () => {
const stdout = execSync( const stdout = execSync(
'DEBUG=true DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/output/streams npm run playlist:update --silent', 'DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/output/streams npm run playlist:update --silent',
{ {
encoding: 'utf8' encoding: 'utf8'
} }

View File

@@ -10,14 +10,17 @@ it('can create report', () => {
expect( expect(
stdout.includes(` stdout.includes(`
┌─────────┬─────────────┬───────────────────┬──────────────┐ ┌─────────┬─────────────┬─────────────────┬─────────────────────┬────────────────
│ (index) │ issueNumber │ channelId │ status │ │ (index) │ issueNumber │ type │ channelId status
├─────────┼─────────────┼───────────────────┼──────────────┤ ├─────────┼─────────────┼─────────────────┼─────────────────────┼────────────────
│ 0 │ 14179 │ 'ManoramaNews.in' │ 'pending' │ 0 │ 14110 │ 'streams:edit' │ 'BBCAmericaEast.us' │ 'invalid_link'
│ 1 │ 14178 'TV3.my' │ 'blocked' │ 1 │ 14120'streams:edit' │ 'boo.us' │ 'invalid_id' │
│ 2 │ 14177 'TUTV.us' │ 'fullfilled' │ │ 2 │ 14140'broken stream' │ undefined │ 'invalid_link' │
│ 3 │ 14176'ManoramaNews.in' │ 'duplicate' │ │ 3 │ 14175 'streams:add' │ 'TFX.fr' │ 'invalid_id' │
│ 4 │ 14175 'TFX.fr' │ 'invalid_id' │ 4 │ 14176'streams:add' 'ManoramaNews.in' 'duplicate'
└─────────┴─────────────┴───────────────────┴──────────────┘`) │ 5 │ 14177 │ 'streams:add' │ 'TUTV.us' │ 'fullfilled' │
│ 6 │ 14178 │ 'streams:add' │ 'TV3.my' │ 'blocked' │
│ 7 │ 14179 │ 'streams:add' │ 'ManoramaNews.in' │ 'pending' │
└─────────┴─────────────┴─────────────────┴─────────────────────┴────────────────┘`)
).toBe(true) ).toBe(true)
}) })