Update tests

This commit is contained in:
freearhey 2023-10-15 09:27:41 +03:00
parent 0c0cc2af93
commit f3ba9fbcfe
4 changed files with 27 additions and 35 deletions

View file

@ -12,10 +12,9 @@ beforeEach(() => {
describe('channels:parse', () => {
it('can parse channels', () => {
execSync(
'npm run channels:parse -- --config=tests/__data__/input/channels-parse/channels-parse.config.js --output=tests/__data__/output/channels.xml',
{ encoding: 'utf8' }
)
const cmd =
'npm run channels:parse -- --config=tests/__data__/input/channels-parse/channels-parse.config.js --output=tests/__data__/output/channels.xml'
execSync(cmd, { encoding: 'utf8' })
expect(content('tests/__data__/output/channels.xml')).toEqual(
content('tests/__data__/expected/sites/channels-parse/channels-parse.channels.xml')
@ -23,10 +22,9 @@ describe('channels:parse', () => {
})
it('can parse channels with clean flag', () => {
execSync(
'npm run channels:parse -- --config=tests/__data__/input/channels-parse/channels-parse.config.js --output=tests/__data__/output/channels.xml --clean',
{ encoding: 'utf8' }
)
const cmd =
'npm run channels:parse -- --config=tests/__data__/input/channels-parse/channels-parse.config.js --output=tests/__data__/output/channels.xml --clean'
execSync(cmd, { encoding: 'utf8' })
expect(content('tests/__data__/output/channels.xml')).toEqual(
content('tests/__data__/expected/sites/channels-parse/channels-parse-clean.channels.xml')