diff --git a/tests/commands/channels/format.test.ts b/tests/commands/channels/format.test.ts index 503d2a608..5ba3328bb 100644 --- a/tests/commands/channels/format.test.ts +++ b/tests/commands/channels/format.test.ts @@ -2,6 +2,8 @@ import { execSync } from 'child_process' import { pathToFileURL } from 'node:url' import fs from 'fs-extra' +const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data' + beforeEach(() => { fs.emptyDirSync('tests/__data__/output') fs.copySync( @@ -12,7 +14,7 @@ beforeEach(() => { describe('channels:format', () => { it('can format *.channels.xml files', () => { - const cmd = 'npm run channels:format --- tests/__data__/output/example.com.channels.xml' + const cmd = `${ENV_VAR} npm run channels:format --- tests/__data__/output/example.com.channels.xml` const stdout = execSync(cmd, { encoding: 'utf8' }) if (process.env.DEBUG === 'true') console.log(cmd, stdout) diff --git a/tests/commands/guides/export.test.ts b/tests/commands/guides/export.test.ts index ee787e8a2..3b826e24b 100644 --- a/tests/commands/guides/export.test.ts +++ b/tests/commands/guides/export.test.ts @@ -3,7 +3,7 @@ import fs from 'fs-extra' import { pathToFileURL } from 'node:url' const ENV_VAR = - 'cross-env SITES_DIR=tests/__data__/input/guides_export/sites API_DIR=tests/__data__/output' + 'cross-env SITES_DIR=tests/__data__/input/guides_export/sites DATA_DIR=tests/__data__/input/data API_DIR=tests/__data__/output' beforeEach(() => { fs.emptyDirSync('tests/__data__/output')