feat: add project context model
This commit is contained in:
parent
0e3815ac3c
commit
0b127b5404
4 changed files with 54 additions and 1 deletions
15
tests/lib/project-context.test.ts
Normal file
15
tests/lib/project-context.test.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
|
||||
import { buildProjectContext } from '../../src/lib/project-context';
|
||||
|
||||
test('buildProjectContext derives normalized project identity', () => {
|
||||
const project = buildProjectContext('C:/Repo/Project');
|
||||
|
||||
assert.equal(project.root, 'C:\\Repo\\Project');
|
||||
assert.equal(project.key, 'c:\\repo\\project');
|
||||
assert.equal(project.displayPath, 'C:/Repo/Project');
|
||||
assert.equal(project.name, 'Project');
|
||||
assert.equal(project.source, 'local');
|
||||
assert.equal(project.addedAt, null);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue