Migrate all search to v2 and remove v1 (#11125)
This commit is contained in:
@@ -4,7 +4,6 @@ import {
|
||||
countActiveFilters,
|
||||
definedFilterParams,
|
||||
filtersToApiParams,
|
||||
filtersToLegacyParams,
|
||||
hasPostOnlyFilters,
|
||||
parseHistoryEntry,
|
||||
readSearchFilters,
|
||||
@@ -76,34 +75,6 @@ describe(`searchParams`, () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe(`filtersToLegacyParams`, () => {
|
||||
it(`maps structured filters back to legacy query operators`, () => {
|
||||
expect(
|
||||
filtersToLegacyParams({
|
||||
author: 'alice',
|
||||
mentions: 'bob',
|
||||
domain: 'bsky.app',
|
||||
url: 'bsky.app/x',
|
||||
tag: 'atproto',
|
||||
lang: 'en',
|
||||
since: '2024-01-01',
|
||||
until: '2024-02-01',
|
||||
media: 'true',
|
||||
replies: 'none',
|
||||
}),
|
||||
).toEqual({
|
||||
from: 'alice',
|
||||
mentions: 'bob',
|
||||
domain: 'bsky.app',
|
||||
url: 'bsky.app/x',
|
||||
tag: 'atproto',
|
||||
lang: 'en',
|
||||
since: '2024-01-01',
|
||||
until: '2024-02-01',
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe(`filtersToApiParams`, () => {
|
||||
it(`splits list fields into arrays and maps v2-only filters`, () => {
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user