Overlay 2.0 (#12)

This commit is contained in:
2026-03-01 02:36:51 -08:00
committed by GitHub
parent 45df3c466b
commit 44c7761c7c
397 changed files with 15139 additions and 7127 deletions

View File

@@ -29,7 +29,8 @@ test('jlpt dictionary runtime main deps builder maps search paths and log prefix
const deps = createBuildJlptDictionaryRuntimeMainDepsHandler({
isJlptEnabled: () => true,
getDictionaryRoots: () => ['/root/a'],
getJlptDictionarySearchPaths: ({ getDictionaryRoots }) => getDictionaryRoots().map((path) => `${path}/jlpt`),
getJlptDictionarySearchPaths: ({ getDictionaryRoots }) =>
getDictionaryRoots().map((path) => `${path}/jlpt`),
setJlptLevelLookup: () => calls.push('set-lookup'),
logInfo: (message) => calls.push(`log:${message}`),
})();
@@ -53,9 +54,9 @@ test('frequency dictionary roots main handler returns expected root list', () =>
joinPath: (...parts) => parts.join('/'),
})();
assert.equal(roots.length, 15);
assert.equal(roots[0], '/repo/dist/main/../../vendor/jiten_freq_global');
assert.equal(roots[14], '/repo');
assert.equal(roots.length, 11);
assert.equal(roots[0], '/repo/dist/main/../../vendor/frequency-dictionary');
assert.equal(roots[10], '/repo');
});
test('frequency dictionary runtime main deps builder maps search paths/source and log prefix', () => {