From f3a3f9a2c12ce0b84c8587329005f3fd200d2811 Mon Sep 17 00:00:00 2001 From: archat-hash Date: Sun, 7 Jun 2026 23:10:51 +0200 Subject: [PATCH 1/2] chore(release): v1.4.0 with Windows FreeCAD support --- package.json | 2 +- src/infrastructure/cad/EnvironmentManager.js | 5 ++ test/unit/EnvironmentManager.test.js | 57 ++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 test/unit/EnvironmentManager.test.js diff --git a/package.json b/package.json index de36685..c56a626 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flycli", - "version": "1.3.1", + "version": "1.4.0", "description": "A reliable CLI tool for Betaflight flight controller interaction and automation.", "license": "MIT", "keywords": [ diff --git a/src/infrastructure/cad/EnvironmentManager.js b/src/infrastructure/cad/EnvironmentManager.js index ea7b445..4d45a83 100644 --- a/src/infrastructure/cad/EnvironmentManager.js +++ b/src/infrastructure/cad/EnvironmentManager.js @@ -1,4 +1,5 @@ import fs from 'fs/promises'; +import path from 'path'; /** * @module EnvironmentManager @@ -16,6 +17,10 @@ const WINDOWS_PATHS = [ 'C:\\Program Files\\FreeCAD 0.21\\bin\\FreeCAD.exe', 'C:\\Program Files\\FreeCAD 0.20\\bin\\FreeCAD.exe', 'C:\\Program Files\\FreeCAD 1.0\\bin\\FreeCAD.exe', + // Per-user installations + path.join(process.env.LOCALAPPDATA || '', 'Programs', 'FreeCAD 1.0', 'bin', 'freecad.exe'), + path.join(process.env.LOCALAPPDATA || '', 'Programs', 'FreeCAD 0.21', 'bin', 'freecad.exe'), + path.join(process.env.LOCALAPPDATA || '', 'Programs', 'FreeCAD 0.22', 'bin', 'freecad.exe'), ]; const UNIX_PATHS = [ diff --git a/test/unit/EnvironmentManager.test.js b/test/unit/EnvironmentManager.test.js new file mode 100644 index 0000000..900034d --- /dev/null +++ b/test/unit/EnvironmentManager.test.js @@ -0,0 +1,57 @@ +import { jest } from '@jest/globals'; + +// Mock fs/promises +const mockStat = jest.fn(); +jest.unstable_mockModule('fs/promises', () => ({ + default: { + stat: mockStat, + }, +})); + +const { EnvironmentManager } = await import('../../src/infrastructure/cad/EnvironmentManager.js'); + +describe('EnvironmentManager', () => { + beforeEach(() => { + jest.clearAllMocks(); + delete process.env.FREECAD_PATH; + }); + + it('should find FreeCAD using FREECAD_PATH override', async () => { + const customPath = '/custom/path/freecad'; + process.env.FREECAD_PATH = customPath; + mockStat.mockResolvedValue({ isFile: () => true }); + + const env = new EnvironmentManager({ info: jest.fn() }); + const found = await env.ensureEnvironmentReady(); + + expect(found).toBe(customPath); + expect(mockStat).toHaveBeenCalledWith(customPath); + }); + + it('should find FreeCAD in standard Windows paths', async () => { + // Simulate Windows platform for this test if needed, + // but the list is always present in the code. + + // Mock the first path as missing and the second as existing + // C:\Program Files\... + mockStat + .mockRejectedValueOnce(new Error('Not found')) + .mockRejectedValueOnce(new Error('Not found')) + .mockRejectedValueOnce(new Error('Not found')) + // AppData path + .mockResolvedValueOnce({ isFile: () => true }); + + const env = new EnvironmentManager({ info: jest.fn() }); + const found = await env.ensureEnvironmentReady(); + + expect(found).toBeDefined(); + expect(mockStat).toHaveBeenCalled(); + }); + + it('should throw error if FreeCAD is not found', async () => { + mockStat.mockRejectedValue(new Error('Not found')); + + const env = new EnvironmentManager({ info: jest.fn() }); + await expect(env.ensureEnvironmentReady()).rejects.toThrow(/FreeCAD installation not found/); + }); +}); From 6ff8e73638b25646b1afb8251bc392f203ff924c Mon Sep 17 00:00:00 2001 From: archat-hash Date: Sun, 7 Jun 2026 23:19:25 +0200 Subject: [PATCH 2/2] style: fix linting and linebreak style --- index.js | 2 +- package.json | 4 +- test/reports/cucumber_report.json | 309 ++++++++++++++------------- test/unit/EnvironmentManager.test.js | 14 +- 4 files changed, 171 insertions(+), 158 deletions(-) diff --git a/index.js b/index.js index 20d3298..a62c63c 100755 --- a/index.js +++ b/index.js @@ -13,7 +13,7 @@ const program = new Command(); program .name('flycli') .description('CLI tool for Betaflight flight controller interaction') - .version('1.3.1'); + .version('1.4.0'); program .command('scan') diff --git a/package.json b/package.json index c56a626..4d512ee 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ ], "scripts": { "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand", - "test:bdd": "node --experimental-vm-modules node_modules/.bin/cucumber-js", - "test:hw": "node --experimental-vm-modules node_modules/.bin/cucumber-js --profile hw", + "test:bdd": "node --experimental-vm-modules node_modules/@cucumber/cucumber/bin/cucumber-js", + "test:hw": "node --experimental-vm-modules node_modules/@cucumber/cucumber/bin/cucumber-js --profile hw", "test:full": "npm run test && npm run test:bdd && npm run test:hw", "pretest": "npm run lint", "lint": "eslint .", diff --git a/test/reports/cucumber_report.json b/test/reports/cucumber_report.json index c7c52a7..f17b862 100644 --- a/test/reports/cucumber_report.json +++ b/test/reports/cucumber_report.json @@ -13,8 +13,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 5865693 + "status": "failed", + "duration": 20011069400, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -23,11 +24,11 @@ "line": 3, "name": "a flight controller connected", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:54" + "location": "test\\bdd\\shared_steps\\cli_steps.js:54" }, "result": { - "status": "passed", - "duration": 5325057 + "status": "skipped", + "duration": 0 } }, { @@ -36,11 +37,11 @@ "line": 4, "name": "the connection handshake is successful", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:89" + "location": "test\\bdd\\shared_steps\\cli_steps.js:89" }, "result": { - "status": "passed", - "duration": 29705375 + "status": "skipped", + "duration": 0 } }, { @@ -49,11 +50,11 @@ "line": 5, "name": "the flight controller entered CLI mode", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:93" + "location": "test\\bdd\\shared_steps\\cli_steps.js:93" }, "result": { - "status": "passed", - "duration": 1422953 + "status": "skipped", + "duration": 0 } }, { @@ -62,11 +63,11 @@ "line": 8, "name": "I execute the CLI command \"status\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:100" + "location": "test\\bdd\\shared_steps\\cli_steps.js:100" }, "result": { - "status": "passed", - "duration": 134954751 + "status": "skipped", + "duration": 0 } }, { @@ -75,11 +76,11 @@ "line": 9, "name": "the response should contain \"MCU\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:150" + "location": "test\\bdd\\shared_steps\\cli_steps.js:150" }, "result": { - "status": "passed", - "duration": 4605192 + "status": "skipped", + "duration": 0 } }, { @@ -88,11 +89,11 @@ "line": 10, "name": "the output should not be empty", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:217" + "location": "test\\bdd\\shared_steps\\cli_steps.js:217" }, "result": { - "status": "passed", - "duration": 1579710 + "status": "skipped", + "duration": 0 } }, { @@ -100,7 +101,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 615450 + "duration": 586899 } } ], @@ -118,8 +119,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 2536859 + "status": "failed", + "duration": 20006329599, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -128,11 +130,11 @@ "line": 3, "name": "a flight controller connected", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:54" + "location": "test\\bdd\\shared_steps\\cli_steps.js:54" }, "result": { - "status": "passed", - "duration": 699569 + "status": "skipped", + "duration": 0 } }, { @@ -141,11 +143,11 @@ "line": 4, "name": "the connection handshake is successful", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:89" + "location": "test\\bdd\\shared_steps\\cli_steps.js:89" }, "result": { - "status": "passed", - "duration": 25139064 + "status": "skipped", + "duration": 0 } }, { @@ -154,11 +156,11 @@ "line": 5, "name": "the flight controller entered CLI mode", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:93" + "location": "test\\bdd\\shared_steps\\cli_steps.js:93" }, "result": { - "status": "passed", - "duration": 664604 + "status": "skipped", + "duration": 0 } }, { @@ -167,11 +169,11 @@ "line": 13, "name": "I execute the CLI command \"tasks\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:100" + "location": "test\\bdd\\shared_steps\\cli_steps.js:100" }, "result": { - "status": "passed", - "duration": 134624777 + "status": "skipped", + "duration": 0 } }, { @@ -180,11 +182,11 @@ "line": 14, "name": "the output should contain \"Task\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:156" + "location": "test\\bdd\\shared_steps\\cli_steps.js:156" }, "result": { - "status": "passed", - "duration": 3599350 + "status": "skipped", + "duration": 0 } }, { @@ -193,11 +195,11 @@ "line": 15, "name": "the response should contain \"SYSTEM\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:150" + "location": "test\\bdd\\shared_steps\\cli_steps.js:150" }, "result": { - "status": "passed", - "duration": 689737 + "status": "skipped", + "duration": 0 } }, { @@ -205,7 +207,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 783314 + "duration": 555400 } } ], @@ -218,7 +220,7 @@ "keyword": "Feature", "name": "Basic Command Execution", "tags": [], - "uri": "test/bdd/general/basic_execution.feature" + "uri": "test\\bdd\\general\\basic_execution.feature" }, { "description": " As a pilot or AI agent\n I want to find connected flight controllers\n So that I can connect and interact with them", @@ -234,8 +236,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 2082910 + "status": "failed", + "duration": 20015094799, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -244,11 +247,11 @@ "line": 7, "name": "the flight controller is connected to port \"/dev/tty.usbmodem0x80000001\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:66" + "location": "test\\bdd\\shared_steps\\cli_steps.js:66" }, "result": { - "status": "passed", - "duration": 3458164 + "status": "skipped", + "duration": 0 } }, { @@ -257,11 +260,11 @@ "line": 8, "name": "I run the \"scan\" command", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:126" + "location": "test\\bdd\\shared_steps\\cli_steps.js:126" }, "result": { - "status": "passed", - "duration": 8587261 + "status": "skipped", + "duration": 0 } }, { @@ -270,11 +273,11 @@ "line": 9, "name": "I should see \"/dev/tty.usbmodem0x80000001\" in the output", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:193" + "location": "test\\bdd\\shared_steps\\cli_steps.js:193" }, "result": { - "status": "passed", - "duration": 2697889 + "status": "skipped", + "duration": 0 } }, { @@ -283,11 +286,11 @@ "line": 10, "name": "the response should contain \"Betaflight\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:150" + "location": "test\\bdd\\shared_steps\\cli_steps.js:150" }, "result": { - "status": "passed", - "duration": 150749 + "status": "skipped", + "duration": 0 } }, { @@ -295,7 +298,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 202468 + "duration": 287100 } } ], @@ -308,7 +311,7 @@ "keyword": "Feature", "name": "Serial Port Discovery", "tags": [], - "uri": "test/bdd/general/discovery.feature" + "uri": "test\\bdd\\general\\discovery.feature" }, { "description": " As a developer\n I want the test suite to robustly detect flight controllers\n So that I don't get false negatives due to transient environment issues", @@ -324,8 +327,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 2468677 + "status": "failed", + "duration": 20003255399, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -334,11 +338,11 @@ "line": 7, "name": "I perform a robust hardware discovery", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:116" + "location": "test\\bdd\\shared_steps\\cli_steps.js:116" }, "result": { - "status": "passed", - "duration": 2655163 + "status": "skipped", + "duration": 0 } }, { @@ -347,11 +351,11 @@ "line": 8, "name": "the port \"/dev/tty.usbmodem0x80000001\" should be available in the system", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:198" + "location": "test\\bdd\\shared_steps\\cli_steps.js:198" }, "result": { - "status": "passed", - "duration": 2238696 + "status": "skipped", + "duration": 0 } }, { @@ -359,7 +363,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 158321 + "duration": 443100 } } ], @@ -372,7 +376,7 @@ "keyword": "Feature", "name": "Hardware Discovery Resilience", "tags": [], - "uri": "test/bdd/general/discovery_resilience.feature" + "uri": "test\\bdd\\general\\discovery_resilience.feature" }, { "description": "", @@ -388,8 +392,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 1683871 + "status": "failed", + "duration": 20005827700, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -398,11 +403,11 @@ "line": 4, "name": "a TimeoutError is thrown with a message", "match": { - "location": "test/bdd/shared_steps/error_steps.js:17" + "location": "test\\bdd\\shared_steps\\error_steps.js:17" }, "result": { - "status": "passed", - "duration": 1713978 + "status": "skipped", + "duration": 0 } }, { @@ -411,11 +416,11 @@ "line": 5, "name": "it should be an instance of FlyCliError", "match": { - "location": "test/bdd/shared_steps/error_steps.js:21" + "location": "test\\bdd\\shared_steps\\error_steps.js:21" }, "result": { - "status": "passed", - "duration": 1057242 + "status": "skipped", + "duration": 0 } }, { @@ -424,11 +429,11 @@ "line": 6, "name": "it should have the correct name", "match": { - "location": "test/bdd/shared_steps/error_steps.js:25" + "location": "test\\bdd\\shared_steps\\error_steps.js:25" }, "result": { - "status": "passed", - "duration": 891865 + "status": "skipped", + "duration": 0 } }, { @@ -436,7 +441,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 147962 + "duration": 870999 } } ], @@ -454,8 +459,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 1876845 + "status": "failed", + "duration": 20010461100, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -464,11 +470,11 @@ "line": 9, "name": "a ConnectionError is thrown with a message", "match": { - "location": "test/bdd/shared_steps/error_steps.js:17" + "location": "test\\bdd\\shared_steps\\error_steps.js:17" }, "result": { - "status": "passed", - "duration": 498571 + "status": "skipped", + "duration": 0 } }, { @@ -477,11 +483,11 @@ "line": 10, "name": "it should be an instance of FlyCliError", "match": { - "location": "test/bdd/shared_steps/error_steps.js:21" + "location": "test\\bdd\\shared_steps\\error_steps.js:21" }, "result": { - "status": "passed", - "duration": 172924 + "status": "skipped", + "duration": 0 } }, { @@ -490,11 +496,11 @@ "line": 11, "name": "it should have the correct name", "match": { - "location": "test/bdd/shared_steps/error_steps.js:25" + "location": "test\\bdd\\shared_steps\\error_steps.js:25" }, "result": { - "status": "passed", - "duration": 76961 + "status": "skipped", + "duration": 0 } }, { @@ -502,7 +508,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 140462 + "duration": 244600 } } ], @@ -520,8 +526,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 1808829 + "status": "failed", + "duration": 20003849899, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -530,11 +537,11 @@ "line": 14, "name": "a DeviceError is thrown with a message", "match": { - "location": "test/bdd/shared_steps/error_steps.js:17" + "location": "test\\bdd\\shared_steps\\error_steps.js:17" }, "result": { - "status": "passed", - "duration": 264097 + "status": "skipped", + "duration": 0 } }, { @@ -543,11 +550,11 @@ "line": 15, "name": "it should be an instance of FlyCliError", "match": { - "location": "test/bdd/shared_steps/error_steps.js:21" + "location": "test\\bdd\\shared_steps\\error_steps.js:21" }, "result": { - "status": "passed", - "duration": 77494 + "status": "skipped", + "duration": 0 } }, { @@ -556,11 +563,11 @@ "line": 16, "name": "it should have the correct name", "match": { - "location": "test/bdd/shared_steps/error_steps.js:25" + "location": "test\\bdd\\shared_steps\\error_steps.js:25" }, "result": { - "status": "passed", - "duration": 74598 + "status": "skipped", + "duration": 0 } }, { @@ -568,7 +575,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 145758 + "duration": 310900 } } ], @@ -581,7 +588,7 @@ "keyword": "Feature", "name": "Domain Error Hierarchy", "tags": [], - "uri": "test/bdd/general/domain_errors.feature" + "uri": "test\\bdd\\general\\domain_errors.feature" }, { "description": "", @@ -597,8 +604,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 2173329 + "status": "failed", + "duration": 20007232499, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -607,11 +615,11 @@ "line": 3, "name": "a flight controller connected", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:54" + "location": "test\\bdd\\shared_steps\\cli_steps.js:54" }, "result": { - "status": "passed", - "duration": 239335 + "status": "skipped", + "duration": 0 } }, { @@ -620,11 +628,11 @@ "line": 4, "name": "the connection handshake is successful", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:89" + "location": "test\\bdd\\shared_steps\\cli_steps.js:89" }, "result": { - "status": "passed", - "duration": 21824412 + "status": "skipped", + "duration": 0 } }, { @@ -633,11 +641,11 @@ "line": 5, "name": "the flight controller entered CLI mode", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:93" + "location": "test\\bdd\\shared_steps\\cli_steps.js:93" }, "result": { - "status": "passed", - "duration": 319816 + "status": "skipped", + "duration": 0 } }, { @@ -646,11 +654,11 @@ "line": 8, "name": "I execute the reboot command \"save\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:104" + "location": "test\\bdd\\shared_steps\\cli_steps.js:104" }, "result": { - "status": "passed", - "duration": 128895680 + "status": "skipped", + "duration": 0 } }, { @@ -659,11 +667,11 @@ "line": 9, "name": "the output should contain \"[REBOOT_INITIATED]\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:156" + "location": "test\\bdd\\shared_steps\\cli_steps.js:156" }, "result": { - "status": "passed", - "duration": 446343 + "status": "skipped", + "duration": 0 } }, { @@ -672,11 +680,11 @@ "line": 10, "name": "the controller should have disconnected within 3 seconds", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:225" + "location": "test\\bdd\\shared_steps\\cli_steps.js:225" }, "result": { - "status": "passed", - "duration": 2471947 + "status": "skipped", + "duration": 0 } }, { @@ -684,7 +692,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 146435 + "duration": 175799 } } ], @@ -697,7 +705,7 @@ "keyword": "Feature", "name": "Reboot Logic", "tags": [], - "uri": "test/bdd/general/reboot_logic.feature" + "uri": "test\\bdd\\general\\reboot_logic.feature" }, { "description": " As a pilot\n I want to run a health check on my flight controller\n So that I can identify potential issues before flight", @@ -713,8 +721,9 @@ "keyword": "Before", "hidden": true, "result": { - "status": "passed", - "duration": 10046089341 + "status": "failed", + "duration": 20015095299, + "error_message": "Error: function timed out, ensure the promise resolves within 20000 milliseconds\n at Timeout. (D:\\Projects\\FlyCLI\\node_modules\\@cucumber\\cucumber\\lib\\time.js:64:20)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)" } }, { @@ -723,11 +732,11 @@ "line": 7, "name": "a flight controller connected to \"/dev/tty.usbmodem0x80000001\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:72" + "location": "test\\bdd\\shared_steps\\cli_steps.js:72" }, "result": { - "status": "passed", - "duration": 3940241 + "status": "skipped", + "duration": 0 } }, { @@ -736,11 +745,11 @@ "line": 8, "name": "the controller returns valid \"version\" and \"tasks\" output", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:79" + "location": "test\\bdd\\shared_steps\\cli_steps.js:79" }, "result": { - "status": "passed", - "duration": 5492019 + "status": "skipped", + "duration": 0 } }, { @@ -749,11 +758,11 @@ "line": 9, "name": "I run the \"health\" command", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:126" + "location": "test\\bdd\\shared_steps\\cli_steps.js:126" }, "result": { - "status": "passed", - "duration": 565068027 + "status": "skipped", + "duration": 0 } }, { @@ -762,11 +771,11 @@ "line": 10, "name": "I should receive a JSON report", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:174" + "location": "test\\bdd\\shared_steps\\cli_steps.js:174" }, "result": { - "status": "passed", - "duration": 1405644 + "status": "skipped", + "duration": 0 } }, { @@ -775,11 +784,11 @@ "line": 11, "name": "the report should contain \"version\" and \"tasks\"", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:181" + "location": "test\\bdd\\shared_steps\\cli_steps.js:181" }, "result": { - "status": "passed", - "duration": 3927067 + "status": "skipped", + "duration": 0 } }, { @@ -788,11 +797,11 @@ "line": 12, "name": "the controller should have executed \"version\" and \"tasks\" commands", "match": { - "location": "test/bdd/shared_steps/cli_steps.js:189" + "location": "test\\bdd\\shared_steps\\cli_steps.js:189" }, "result": { - "status": "passed", - "duration": 5557107 + "status": "skipped", + "duration": 0 } }, { @@ -800,7 +809,7 @@ "hidden": true, "result": { "status": "passed", - "duration": 206098 + "duration": 103399 } } ], @@ -813,6 +822,6 @@ "keyword": "Feature", "name": "Health Check Command", "tags": [], - "uri": "test/bdd/general/system_health.feature" + "uri": "test\\bdd\\general\\system_health.feature" } ] \ No newline at end of file diff --git a/test/unit/EnvironmentManager.test.js b/test/unit/EnvironmentManager.test.js index 900034d..1757032 100644 --- a/test/unit/EnvironmentManager.test.js +++ b/test/unit/EnvironmentManager.test.js @@ -29,11 +29,15 @@ describe('EnvironmentManager', () => { }); it('should find FreeCAD in standard Windows paths', async () => { - // Simulate Windows platform for this test if needed, - // but the list is always present in the code. - - // Mock the first path as missing and the second as existing - // C:\Program Files\... + /* + * Simulate Windows platform for this test if needed, + * but the list is always present in the code. + */ + + /* + * Mock the first path as missing and the second as existing + * C:\Program Files\... + */ mockStat .mockRejectedValueOnce(new Error('Not found')) .mockRejectedValueOnce(new Error('Not found'))