Update tests

This commit is contained in:
freearhey 2025-04-02 07:12:46 +03:00
parent 510d89c8c8
commit 37664b49b9
8 changed files with 56 additions and 67 deletions

View file

@ -3,10 +3,10 @@ import fs from 'fs-extra'
import { pathToFileURL } from 'node:url'
import os from 'os'
let ENV_VAR = 'SITES_DIR=tests/__data__/input/epg-grab/sites API_DIR=tests/__data__/output'
let ENV_VAR = 'SITES_DIR=tests/__data__/input/api_generate/sites API_DIR=tests/__data__/output'
if (os.platform() === 'win32') {
ENV_VAR =
'SET "SITES_DIR=tests/__data__/input/epg-grab/sites" && SET "API_DIR=tests/__data__/output" &&'
'SET "SITES_DIR=tests/__data__/input/api_generate/sites" && SET "API_DIR=tests/__data__/output" &&'
}
beforeEach(() => {
@ -20,7 +20,7 @@ describe('api:generate', () => {
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
expect(content('tests/__data__/output/guides.json')).toEqual(
content('tests/__data__/expected/guides.json')
content('tests/__data__/expected/api_generate/guides.json')
)
})
})