Update bin.test.js

This commit is contained in:
Aleksandr Statciuk 2022-03-15 14:52:55 +03:00
parent 6794766a2f
commit 3a6ceb4adb
1 changed files with 16 additions and 0 deletions

View File

@ -38,3 +38,19 @@ it('can load mini config', () => {
expect(stdoutResultTester(result)).toBe(true)
expect(result.includes("File 'tests/output/mini.guide.xml' successfully saved")).toBe(true)
})
it('can generate gzip version', () => {
const result = execSync(
`node ${pwd}/bin/epg-grabber.js \
--config=tests/input/mini.config.js \
--channels=tests/input/example.com.channels.xml \
--output=tests/output/mini.guide.xml.gz \
--gzip`,
{
encoding: 'utf8'
}
)
expect(stdoutResultTester(result)).toBe(true)
expect(result.includes("File 'tests/output/mini.guide.xml.gz' successfully saved")).toBe(true)
})