mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 18:37:01 -05:00
Rename channels:editor to channels:edit
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
"api:generate": "npx tsx scripts/commands/api/generate.ts",
|
"api:generate": "npx tsx scripts/commands/api/generate.ts",
|
||||||
"channels:lint": "npx tsx scripts/commands/channels/lint.ts",
|
"channels:lint": "npx tsx scripts/commands/channels/lint.ts",
|
||||||
"channels:parse": "npx tsx scripts/commands/channels/parse.ts",
|
"channels:parse": "npx tsx scripts/commands/channels/parse.ts",
|
||||||
"channels:editor": "npx tsx scripts/commands/channels/editor.ts",
|
"channels:edit": "npx tsx scripts/commands/channels/edit.ts",
|
||||||
"channels:validate": "npx tsx scripts/commands/channels/validate.ts",
|
"channels:validate": "npx tsx scripts/commands/channels/validate.ts",
|
||||||
"sites:init": "npx tsx scripts/commands/sites/init.ts",
|
"sites:init": "npx tsx scripts/commands/sites/init.ts",
|
||||||
"sites:update": "npx tsx scripts/commands/sites/update.ts",
|
"sites:update": "npx tsx scripts/commands/sites/update.ts",
|
||||||
|
|||||||
@@ -16,15 +16,15 @@ if (os.platform() === 'win32') {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
fs.copySync(
|
fs.copySync(
|
||||||
'tests/__data__/input/channels-editor/channels-editor.channels.xml',
|
'tests/__data__/input/channels-edit/example.com.channels.xml',
|
||||||
'tests/__data__/output/channels.xml'
|
'tests/__data__/output/channels.xml'
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('channels:editor', () => {
|
describe('channels:edit', () => {
|
||||||
it('shows list of options for a channel', () => {
|
it('shows list of options for a channel', () => {
|
||||||
try {
|
try {
|
||||||
const cmd = `${ENV_VAR} npm run channels:editor --- tests/__data__/output/channels.xml`
|
const cmd = `${ENV_VAR} npm run channels:edit --- tests/__data__/output/channels.xml`
|
||||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -40,7 +40,7 @@ describe('channels:editor', () => {
|
|||||||
"File 'tests/__data__/output/channels.xml' successfully saved"
|
"File 'tests/__data__/output/channels.xml' successfully saved"
|
||||||
)
|
)
|
||||||
expect(content('tests/__data__/output/channels.xml')).toEqual(
|
expect(content('tests/__data__/output/channels.xml')).toEqual(
|
||||||
content('tests/__data__/expected/sites/channels-editor/channels-editor.channels.xml')
|
content('tests/__data__/expected/sites/channels-edit/example.com.channels.xml')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user