-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adam Setch <adam.setch@outlook.com>
- Loading branch information
Showing
18 changed files
with
175 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 16 additions & 16 deletions
32
src/components/__snapshots__/AccountNotifications.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { defaultSettings } from '../context/App'; | ||
import type { SettingsState } from '../types'; | ||
import { getFilterCount } from './filters'; | ||
|
||
describe('utils/filters.ts', () => { | ||
describe('filter count', () => { | ||
it('default filter settings', () => { | ||
expect(getFilterCount(defaultSettings)).toBe(0); | ||
}); | ||
|
||
it('non-default category filters', () => { | ||
const settings = { | ||
...defaultSettings, | ||
filterCategories: ['direct'], | ||
} as SettingsState; | ||
expect(getFilterCount(settings)).toBe(1); | ||
}); | ||
|
||
it('non-default read state filters', () => { | ||
const settings = { | ||
...defaultSettings, | ||
filterReadStates: ['read'], | ||
} as SettingsState; | ||
expect(getFilterCount(settings)).toBe(1); | ||
}); | ||
|
||
it('non-default product filters', () => { | ||
const settings = { | ||
...defaultSettings, | ||
filterProducts: ['bitbucket'], | ||
} as SettingsState; | ||
expect(getFilterCount(settings)).toBe(1); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.