mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Fixes channels:editor script
This commit is contained in:
parent
11856161c2
commit
6e2cc42bc6
5 changed files with 23 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
import fs from 'fs-extra'
|
||||
import { execSync } from 'child_process'
|
||||
import os from 'os'
|
||||
import path from 'path'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
|
@ -25,5 +26,14 @@ describe('channels:editor', () => {
|
|||
expect(stdout).toContain('Overwrite')
|
||||
expect(stdout).toContain('Skip')
|
||||
expect(stdout).toContain("File 'tests/__data__/output/channels.xml' successfully saved")
|
||||
expect(content('tests/__data__/output/channels.xml')).toEqual(
|
||||
content('tests/__data__/expected/sites/channels-editor/channels-editor.channels.xml')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
return fs.readFileSync(path.resolve(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue