mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-22 11:51:01 +02:00
feat: read CLI package metadata dynamically
This commit is contained in:
parent
994bc23147
commit
271c05ac99
3 changed files with 38 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|||
|
||||
import {
|
||||
getKtxCliPackageInfo,
|
||||
packageInfoFromJson,
|
||||
rendererUnavailableVizFallback,
|
||||
renderMemoryFlowTui,
|
||||
resolveVizFallback,
|
||||
|
|
@ -56,6 +57,19 @@ describe('getKtxCliPackageInfo', () => {
|
|||
version: '0.0.0-private',
|
||||
});
|
||||
});
|
||||
|
||||
it('normalizes public package metadata from package.json contents', () => {
|
||||
expect(
|
||||
packageInfoFromJson({
|
||||
name: '@kaelio/ktx',
|
||||
version: '0.1.0',
|
||||
}),
|
||||
).toEqual({
|
||||
name: '@kaelio/ktx',
|
||||
version: '0.1.0',
|
||||
contextPackageName: '@ktx/context',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('memory-flow renderer exports', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue