mirror of
https://github.com/iptv-org/iptv
synced 2025-12-16 10:26:48 -05:00
use cross-env to send parameters in an easier manner
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import { execSync } from 'child_process'
|
||||
import os, { EOL } from 'node:os'
|
||||
import { EOL } from 'node:os'
|
||||
import * as fs from 'fs-extra'
|
||||
import * as glob from 'glob'
|
||||
|
||||
let ENV_VAR =
|
||||
'STREAMS_DIR=tests/__data__/input/playlist_generate DATA_DIR=tests/__data__/input/data PUBLIC_DIR=tests/__data__/output/.gh-pages LOGS_DIR=tests/__data__/output/logs'
|
||||
if (os.platform() === 'win32') {
|
||||
ENV_VAR =
|
||||
'SET "STREAMS_DIR=tests/__data__/input/playlist_generate" && SET "DATA_DIR=tests/__data__/input/data" && SET "PUBLIC_DIR=tests/__data__/output/.gh-pages" && SET "LOGS_DIR=tests/__data__/output/logs" &&'
|
||||
}
|
||||
const ENV_VAR = 'cross-env STREAMS_DIR=tests/__data__/input/playlist_generate DATA_DIR=tests/__data__/input/data PUBLIC_DIR=tests/__data__/output/.gh-pages LOGS_DIR=tests/__data__/output/logs'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
@@ -31,7 +26,7 @@ describe('playlist:generate', () => {
|
||||
})
|
||||
|
||||
playlists.forEach((filepath: string) => {
|
||||
expect(content(`tests/__data__/output/${filepath}`), filepath).toBe(
|
||||
expect(content(`tests/__data__/output/${filepath}`)).toBe(
|
||||
content(`tests/__data__/expected/playlist_generate/${filepath}`)
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user