chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)
This commit is contained in:
commit
9097ee699d
5769 files changed
+1446466
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import test from 'node:test'
|
||||
|
||||
import { shouldRefreshWikiStatusAfterKnowledgePoll } from './wikiStatusRefresh.ts'
|
||||
|
||||
test('refreshes wiki status when a polled document leaves an in-flight state', () => {
|
||||
assert.equal(
|
||||
shouldRefreshWikiStatusAfterKnowledgePoll(
|
||||
{ parse_status: 'finalizing', summary_status: 'processing' },
|
||||
{ parse_status: 'completed', summary_status: 'completed' },
|
||||
),
|
||||
true,
|
||||
)
|
||||
})
|
||||
|
||||
test('does not refresh wiki status for ordinary in-flight polling updates', () => {
|
||||
assert.equal(
|
||||
shouldRefreshWikiStatusAfterKnowledgePoll(
|
||||
{ parse_status: 'pending' },
|
||||
{ parse_status: 'processing' },
|
||||
),
|
||||
false,
|
||||
)
|
||||
})
|
||||
Reference in new issue
Block a user