// Regression test for lock port env override used by e2e isolation.
import { expect, test } from 'vitest';
import { getLockPort } from './config.js';
test('getLockPort uses KIMAKI_LOCK_PORT when set to a valid value', () => {
    const originalLockPort = process.env['KIMAKI_LOCK_PORT'];
    process.env['KIMAKI_LOCK_PORT'] = '43123';
    try {
        expect(getLockPort()).toBe(43123);
    }
    finally {
        if (originalLockPort === undefined) {
            delete process.env['KIMAKI_LOCK_PORT'];
            return;
        }
        process.env['KIMAKI_LOCK_PORT'] = originalLockPort;
    }
});
