tests: placeholder home folders in the launcher test (scrub)

This commit is contained in:
CRTkafa 2026-11-06 21:04:14 +07:00
parent 0950ef2c99
commit 36ef9c2c5c

View file

@ -6,14 +6,14 @@ import { ensureCliShim, onPath, SHIM_MARKER, shimPlan } from '../cli/lib/cli-shi
describe('desktop terminal launcher', () => {
test('per platform: file, content, PATH folder, profile', () => {
const w = shimPlan({ exe: 'C:\\Users\\a\\AppData\\Local\\storebound\\storebound.exe', platform: 'win32', home: 'C:\\Users\\a', env: { LOCALAPPDATA: 'C:\\Users\\a\\AppData\\Local' } });
const w = shimPlan({ exe: 'C:\\Users\\you\\AppData\\Local\\storebound\\storebound.exe', platform: 'win32', home: 'C:\\Users\\you', env: { LOCALAPPDATA: 'C:\\Users\\you\\AppData\\Local' } });
expect(w.file.endsWith('storebound.cmd')).toBe(true);
expect(w.content).toContain('"C:\\Users\\a\\AppData\\Local\\storebound\\storebound.exe" %*');
expect(w.content).toContain('"C:\\Users\\you\\AppData\\Local\\storebound\\storebound.exe" %*');
expect(w.skip).toBeNull();
const m = shimPlan({ exe: "/Applications/store'bound.app/Contents/MacOS/storebound", platform: 'darwin', home: '/Users/a', env: {} });
const m = shimPlan({ exe: "/Applications/store'bound.app/Contents/MacOS/storebound", platform: 'darwin', home: '/Users/you', env: {} });
expect(m.content).toContain(`exec '/Applications/store'\\''bound.app/Contents/MacOS/storebound' "$@"`);
expect(m.profile!.endsWith('.zprofile')).toBe(true);
expect(shimPlan({ exe: '/usr/bin/storebound', platform: 'linux', home: '/home/a', env: {} }).profile!.endsWith('.profile')).toBe(true);
expect(shimPlan({ exe: '/usr/bin/storebound', platform: 'linux', home: '/home/you', env: {} }).profile!.endsWith('.profile')).toBe(true);
});
test('skips AppImage runs and the opt-out', () => {
expect(shimPlan({ exe: '/tmp/.mount_sbX/usr/bin/storebound', platform: 'linux', home: '/h', env: {} }).skip).toContain('AppImage');