From 8ad22c2488f11431d0d1c1fb4d330d9c0eb472c8 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Sun, 24 May 2026 02:12:34 +0300 Subject: [PATCH] Update tests --- tests/commands/channels/format.test.ts | 4 +++- tests/commands/guides/export.test.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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')