Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reebalazs committed Mar 1, 2024
1 parent 31b360c commit ef70a0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/theme/SolrSearch/SearchQuery.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('SOLR SearchQuery', () => {
local: 'true',
SearchableText: 'foobar',
sort_on: 'alphabetic',
sort_order: 'reverse',
}),
).toEqual({
allowLocal: true,
Expand All @@ -31,6 +32,7 @@ describe('SOLR SearchQuery', () => {
local: true,
searchword: 'foobar',
sortOn: 'alphabetic',
sortOrder: 'reverse',
});
});
it('initial', () => {
Expand All @@ -41,6 +43,7 @@ describe('SOLR SearchQuery', () => {
local: false,
searchword: '',
sortOn: 'relevance',
sortOrder: '',
});
});
});
Expand All @@ -54,6 +57,7 @@ describe('SOLR SearchQuery', () => {
local: true,
searchword: 'foobar',
sortOn: 'alphabetic',
sortOrder: 'reverse',
}),
).toEqual({
allow_local: 'true',
Expand All @@ -62,6 +66,7 @@ describe('SOLR SearchQuery', () => {
local: 'true',
SearchableText: 'foobar',
sort_on: 'alphabetic',
sort_order: 'reverse',
});
});
it('defaults ', () => {
Expand All @@ -73,6 +78,7 @@ describe('SOLR SearchQuery', () => {
local: false,
searchword: '',
sortOn: 'relevance',
sortOrder: '',
}),
).toEqual({
allow_local: 'false',
Expand All @@ -81,6 +87,7 @@ describe('SOLR SearchQuery', () => {
local: 'false',
SearchableText: '',
sort_on: 'relevance',
sort_order: '',
});
});
it('prunes condition tree', () => {
Expand All @@ -92,6 +99,7 @@ describe('SOLR SearchQuery', () => {
local: true,
searchword: 'foobar',
sortOn: 'alphabetic',
sortOrder: 'reverse',
}),
).toEqual({
allow_local: 'true',
Expand All @@ -100,6 +108,7 @@ describe('SOLR SearchQuery', () => {
local: 'true',
SearchableText: 'foobar',
sort_on: 'alphabetic',
sort_order: 'reverse',
});
});
});
Expand Down

0 comments on commit ef70a0d

Please sign in to comment.