mirror of
https://github.com/vicky469/aside.git
synced 2026-07-22 07:01:57 +00:00
- Extract sidebar mode tabs into sidebarModeTabs.ts - Extract thread groups into sidebarThreadGroups.ts - Extract thought trail source into sidebarThoughtTrailSource.ts - Remove non-working Tags tab and Tags radio button from thought trail - Remove redundant Related Files h4 heading from thought trail section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
import * as assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import {
|
|
getDefaultThoughtTrailSource,
|
|
normalizeThoughtTrailSource,
|
|
resolveAvailableThoughtTrailSource,
|
|
} from "../src/ui/views/sidebarThoughtTrailSource";
|
|
|
|
test("getDefaultThoughtTrailSource starts fresh views from wikilinks", () => {
|
|
assert.equal(getDefaultThoughtTrailSource(), "wikilinks");
|
|
});
|
|
|
|
test("normalizeThoughtTrailSource accepts only supported sources", () => {
|
|
assert.equal(normalizeThoughtTrailSource("wikilinks"), "wikilinks");
|
|
assert.equal(normalizeThoughtTrailSource("tags"), "tags");
|
|
assert.equal(normalizeThoughtTrailSource("links"), null);
|
|
assert.equal(normalizeThoughtTrailSource(undefined), null);
|
|
});
|
|
|
|
test("resolveAvailableThoughtTrailSource falls back to wikilinks when tag graph is unavailable", () => {
|
|
assert.equal(resolveAvailableThoughtTrailSource("tags", false), "wikilinks");
|
|
assert.equal(resolveAvailableThoughtTrailSource("tags", true), "tags");
|
|
assert.equal(resolveAvailableThoughtTrailSource("wikilinks", false), "wikilinks");
|
|
});
|