mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
19 lines
697 B
TypeScript
19 lines
697 B
TypeScript
import { expect, test } from 'vitest'
|
|
|
|
import { getDocsPath } from './docs-path'
|
|
import { DOCS_URL } from '@/lib/constants'
|
|
|
|
test.each([
|
|
[`${DOCS_URL}/guides/auth`, '/guides/auth'],
|
|
[`${DOCS_URL}/guides/auth?queryGroups=flow#redirect-urls`, '/guides/auth#redirect-urls'],
|
|
[
|
|
`${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0001_unindexed_foreign_keys`,
|
|
'/guides/observability/advisors?lint=0001_unindexed_foreign_keys',
|
|
],
|
|
[DOCS_URL, '/'],
|
|
[`${DOCS_URL}-preview/maintenance`, undefined],
|
|
['https://www.postgresql.org/docs/current/datatype-enum.html', undefined],
|
|
])('getDocsPath(%s) is %s', (href, docsPath) => {
|
|
expect(getDocsPath(href)).toBe(docsPath)
|
|
})
|