mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add support for updating existing filters
This commit is contained in:
parent
3d8bd0d61d
commit
62401d1f76
2 changed files with 14 additions and 3 deletions
|
|
@ -44,7 +44,18 @@ test('Can handle query values with multiple underscores', async t => {
|
|||
t.assert( filters.hasFilter( 'test_value_with_multiple_underscores' ) , 'Has correct filters for query' )
|
||||
})
|
||||
|
||||
// Can handle query values with multiple underscores
|
||||
|
||||
test( 'Can update existing filter', async t => {
|
||||
const filters = new StorkFilters({
|
||||
initialFilters: {
|
||||
'test': 'works_no'
|
||||
}
|
||||
})
|
||||
|
||||
filters.toggleFilter('test_works_yes')
|
||||
|
||||
t.deepEqual( filters.filtersForQuery, 'test_works_yes', 'Has updated filter')
|
||||
})
|
||||
|
||||
|
||||
|
||||
// Can update existing filter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue