mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 18:10:04 -04:00
Update tests
This commit is contained in:
parent
32e38bda52
commit
74b3cff1d2
8 changed files with 49 additions and 48 deletions
|
@ -6,23 +6,23 @@ beforeEach(() => {
|
|||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.mkdirSync('tests/__data__/output/.readme')
|
||||
fs.copyFileSync(
|
||||
'tests/__data__/input/.readme/config.json',
|
||||
'tests/__data__/input/readme_update/.readme/config.json',
|
||||
'tests/__data__/output/.readme/config.json'
|
||||
)
|
||||
fs.copyFileSync(
|
||||
'tests/__data__/input/.readme/template.md',
|
||||
'tests/__data__/input/readme_update/.readme/template.md',
|
||||
'tests/__data__/output/.readme/template.md'
|
||||
)
|
||||
|
||||
execSync(
|
||||
'DATA_DIR=tests/__data__/input/data LOGS_DIR=tests/__data__/input/logs README_DIR=tests/__data__/output/.readme npm run readme:update',
|
||||
'DATA_DIR=tests/__data__/input/data LOGS_DIR=tests/__data__/input/readme_update README_DIR=tests/__data__/output/.readme npm run readme:update',
|
||||
{ encoding: 'utf8' }
|
||||
)
|
||||
})
|
||||
|
||||
it('can update readme.md', () => {
|
||||
expect(content('tests/__data__/output/readme.md')).toEqual(
|
||||
content('tests/__data__/expected/_readme.md')
|
||||
content('tests/__data__/expected/readme_update/_readme.md')
|
||||
)
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue