Files
ForgeBase/Max Avatar/tests/unit/lib.windowsSystem.test.ts
T
william b8aec9ed6b chore(cleanup): remove basic-only utility skills
Removes the system-action skills that were only ever available in the now
-retired Basic/Assistant modes (play_music, open/close_app, open_notepad,
create_document, create_powerpoint, control_volume, control_media_playback,
take_screenshot, clipboard, search_file, set_reminder, lock_screen,
empty_recycle_bin, show_notification, print_file, create_folder,
create_file, delete_file, fill_browser_field) along with their
windows/lib helpers (appRegistry, fileSearch, locations, sendVirtualKey)
and the fillField browser-window helper. Keeps the read-only, side-effect
-free transversal skills (search_web, navigate_browser and friends,
check_system_memory/storage/battery/internet). Drops the now-unused
docx/pptxgenjs dependencies and the stale coachStore/meetingStore entries
from the coverage exclude list.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-31 19:33:04 +01:00

30 lines
1.1 KiB
TypeScript

import { describe, it, expect, vi, afterEach } from 'vitest'
describe('systemPaths', () => {
const originalSystemRoot = process.env.SystemRoot
const originalWindir = process.env.windir
afterEach(() => {
if (originalSystemRoot === undefined) delete process.env.SystemRoot
else process.env.SystemRoot = originalSystemRoot
if (originalWindir === undefined) delete process.env.windir
else process.env.windir = originalWindir
vi.resetModules()
})
it('should fall back to C:\\Windows when neither SystemRoot nor windir is set', async () => {
delete process.env.SystemRoot
delete process.env.windir
vi.resetModules()
const { POWERSHELL_EXE } = await import('../../src/main/skills/windows/lib/systemPaths')
expect(POWERSHELL_EXE).toContain('C:\\Windows')
})
it('should use SystemRoot when set', async () => {
process.env.SystemRoot = 'D:\\CustomWindows'
vi.resetModules()
const { POWERSHELL_EXE } = await import('../../src/main/skills/windows/lib/systemPaths')
expect(POWERSHELL_EXE).toContain('D:\\CustomWindows')
})
})