test(desktop): make the updater target test pass on Windows (#11937)

Signed-off-by: Seydi Charyyev <seydi.charyev@gmail.com>
This commit is contained in:
Seydi Charyyev
2026-09-09 07:31:33 +00:00
committed by GitHub
parent 1c001ab534
commit 30e49b8af2
@@ -36,11 +36,15 @@ afterEach(async () => {
describe('resolveInstallTarget', () => {
it('resolves the .app bundle on macOS', async () => {
setPlatform('darwin');
const exePath = '/Applications/Goose.app/Contents/MacOS/Goose';
// The mocked platform does not change `path`, which stays the host
// implementation, so build the expectation the same way the code under test
// does instead of hardcoding POSIX separators.
const bundlePath = path.resolve('/Applications/Goose.app');
const exePath = path.join(bundlePath, 'Contents', 'MacOS', 'Goose');
await expect(resolveInstallTarget(exePath)).resolves.toEqual({
targetPath: '/Applications/Goose.app',
relaunchPath: '/Applications/Goose.app',
targetPath: bundlePath,
relaunchPath: bundlePath,
executableRelativePath: path.join('Contents', 'MacOS', 'Goose'),
});
});