fix: deduplicate tierLabel/tierOrdinal exports (#988)
* fix: deduplicate tierLabel and tierOrdinal exports
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: update tierLabel test to accept re-export pattern
The test was checking source text for "export function tierLabel" which
doesn't match the re-export syntax "export { tierLabel } from ...".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2687f97a6b
commit
196be59d71
2 changed files with 4 additions and 16 deletions
|
|
@ -135,21 +135,8 @@ export function classifyUnitComplexity(
|
|||
|
||||
// ─── Tier Helpers ─────────────────────────────────────────────────────────
|
||||
|
||||
export function tierLabel(tier: ComplexityTier): string {
|
||||
switch (tier) {
|
||||
case "light": return "L";
|
||||
case "standard": return "S";
|
||||
case "heavy": return "H";
|
||||
}
|
||||
}
|
||||
|
||||
export function tierOrdinal(tier: ComplexityTier): number {
|
||||
switch (tier) {
|
||||
case "light": return 0;
|
||||
case "standard": return 1;
|
||||
case "heavy": return 2;
|
||||
}
|
||||
}
|
||||
// tierLabel and tierOrdinal are exported from complexity-classifier.ts (single source)
|
||||
export { tierLabel, tierOrdinal } from "./complexity-classifier.js";
|
||||
|
||||
export function escalateTier(currentTier: ComplexityTier): ComplexityTier | null {
|
||||
switch (currentTier) {
|
||||
|
|
|
|||
|
|
@ -281,7 +281,8 @@ test("unit-classify: escalateTier function exists", () => {
|
|||
|
||||
test("unit-classify: tierLabel function exists", () => {
|
||||
assert.ok(
|
||||
complexitySrcFull.includes("export function tierLabel"),
|
||||
complexitySrcFull.includes("export function tierLabel") ||
|
||||
complexitySrcFull.includes("export { tierLabel"),
|
||||
"should export tierLabel for dashboard display",
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue