From 3de3209d5e8a498dc89fb962b5d4697dde0613e9 Mon Sep 17 00:00:00 2001 From: Shreyas Date: Thu, 7 Nov 2024 13:26:24 +0530 Subject: [PATCH] fix(cli): use os-specific invalid paths for tests (#4518) --- .../hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts b/packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts index ef8497e0..ac89236c 100644 --- a/packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts +++ b/packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts @@ -644,7 +644,11 @@ describe("hopp test [options] ", { timeout: 100000 }, () => { const COLL_PATH = getTestJsonFilePath("passes-coll.json", "collection"); - const args = `test ${COLL_PATH} --reporter-junit /non-existent-path/report.xml`; + const invalidPath = process.platform === 'win32' + ? 'Z:/non-existent-path/report.xml' + : '/non-existent/report.xml'; + + const args = `test ${COLL_PATH} --reporter-junit ${invalidPath}`; const { stdout, stderr } = await runCLI(args, { cwd: path.resolve("hopp-cli-test"),