test(ai): use supported module mock exports

Use Node's namedExports option so the optional Jieba regression test remains valid under the current node:test type definitions.
This commit is contained in:
digua committed 2026-08-26 21:48:10 +08:00
1 parent 9378029acb
commit f35e41ca70
1 file changed
+1 -1
@@ -5,7 +5,7 @@ import type { AIMemoryEntry } from '@openchatlab/shared-types'
test('ranks Chinese memories without loading the optional Jieba segmenter', async (t) => {
let segmentCalls = 0
await t.mock.module('../../nlp/segmenter', {
exports: {
namedExports: {
segment() {
segmentCalls++
throw new Error('optional Jieba dependency is unavailable')