mirror of https://github.com/iptv-org/iptv
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			24 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			24 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
import { execSync } from 'child_process'
 | 
						|
 | 
						|
it('can create report', () => {
 | 
						|
  const stdout = execSync(
 | 
						|
    'DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/input/streams_report npm run report:create',
 | 
						|
    {
 | 
						|
      encoding: 'utf8'
 | 
						|
    }
 | 
						|
  )
 | 
						|
 | 
						|
  expect(
 | 
						|
    stdout.includes(`
 | 
						|
┌─────────┬─────────────┬───────────────────┬──────────────┐
 | 
						|
│ (index) │ issueNumber │     channelId     │    status    │
 | 
						|
├─────────┼─────────────┼───────────────────┼──────────────┤
 | 
						|
│    0    │    14179    │ 'ManoramaNews.in' │  'pending'   │
 | 
						|
│    1    │    14178    │     'TV3.my'      │  'blocked'   │
 | 
						|
│    2    │    14177    │     'TUTV.us'     │ 'fullfilled' │
 | 
						|
│    3    │    14176    │ 'ManoramaNews.in' │ 'duplicate'  │
 | 
						|
│    4    │    14175    │     'TFX.fr'      │ 'invalid_id' │
 | 
						|
└─────────┴─────────────┴───────────────────┴──────────────┘`)
 | 
						|
  ).toBe(true)
 | 
						|
})
 |