Files
thedotmack--claude-mem/tests/utils/project-name-isolation.test.ts
wehub-resource-sync f9447f8e5f
CI / typecheck · build · test · bundle-size (push) Failing after 1s
CI / clean-room dependency closure smoke (push) Failing after 1s
CI / server-runtime e2e (docker · pg + valkey) (push) Failing after 2s
Deploy Install Scripts / deploy (push) Failing after 2s
Windows / build (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:07:03 +08:00

17 lines
614 B
TypeScript

import { describe, it, expect } from 'bun:test';
import { getProjectName } from '../../src/utils/project-name.js';
describe('getProjectName mock isolation (#1299)', () => {
it('returns real basename, not the leaked test-project mock', () => {
expect(getProjectName('/real/path/to/my-project')).toBe('my-project');
});
it('returns unknown-project for empty string (real implementation)', () => {
expect(getProjectName('')).toBe('unknown-project');
});
it('returns real basename from nested path', () => {
expect(getProjectName('/home/user/code/awesome-app')).toBe('awesome-app');
});
});