mirror of
https://github.com/langgenius/dify.git
synced 2026-03-27 01:00:13 +08:00
Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
10 lines
286 B
TypeScript
10 lines
286 B
TypeScript
import { vi } from 'vitest'
|
|
|
|
export function resolveDocLink(path: string, baseUrl = 'https://docs.example.com') {
|
|
return `${baseUrl}${path}`
|
|
}
|
|
|
|
export function createDocLinkMock(baseUrl = 'https://docs.example.com') {
|
|
return vi.fn((path: string) => resolveDocLink(path, baseUrl))
|
|
}
|