这些界面改动和专家服务草稿停在工作区,没有随上一笔主分支提交进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
738 B
TypeScript
24 lines
738 B
TypeScript
import { renderHookWithConsoleQuery } from '@/test/console/query-data'
|
|
import { useDocLink } from './i18n'
|
|
|
|
vi.mock('#i18n', () => ({
|
|
useLocale: vi.fn(() => 'en-US'),
|
|
}))
|
|
|
|
describe('useDocLink', () => {
|
|
it('does not return an official documentation url', () => {
|
|
const { result } = renderHookWithConsoleQuery(() => useDocLink(), {
|
|
systemFeatures: { deployment_edition: 'CLOUD' },
|
|
})
|
|
|
|
expect(result.current()).toBe('')
|
|
expect(result.current('/use-dify/knowledge/connect-external-knowledge-base')).toBe('')
|
|
expect(
|
|
result.current(undefined, {
|
|
'en-US': '/use-dify/knowledge/external-knowledge-api',
|
|
'zh-Hans': '/use-dify/knowledge/external-knowledge-api',
|
|
}),
|
|
).toBe('')
|
|
})
|
|
})
|