Skip to content

Commit 5624be1

Browse files
author
Hannia Valera
committed
fixed tests for macos
1 parent b5034bf commit 5624be1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/unit-tests/presets/presetsController.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,16 @@ suite('PresetsController re-entry protection', () => {
403403
// Get the real path (resolves symlinks/junctions)
404404
const resolvedPath = fs.realpathSync(pathToResolve);
405405

406+
// On macOS, /var is a symlink to /private/var, so we need to resolve
407+
// both paths to compare them correctly
408+
const expectedPath = fs.realpathSync(presetsJsonPath);
409+
const expectedDir = fs.realpathSync(presetsDir);
410+
406411
// On all platforms, realpath should resolve to the actual file
407-
expect(resolvedPath).to.equal(presetsJsonPath);
412+
expect(resolvedPath).to.equal(expectedPath);
408413

409414
// Verify the directory structure is consistent
410-
expect(path.dirname(resolvedPath)).to.equal(presetsDir);
415+
expect(path.dirname(resolvedPath)).to.equal(expectedDir);
411416
expect(path.basename(resolvedPath)).to.equal('CMakePresets.json');
412417
});
413418
});

0 commit comments

Comments
 (0)