Conversation
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
Inclusive naming check
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
| if (dirtyFields?.whitelist_country_keys) { | ||
| if (!data?.whitelist_country_keys.length) { | ||
| if ( | ||
| !data?.whitelist_country_keys || |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
| if (!data?.whitelist_country_keys.length) { | ||
| if ( | ||
| !data?.whitelist_country_keys || | ||
| !data?.whitelist_country_keys.length |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
| if (dirtyFields?.blacklist_country_keys) { | ||
| if (!data?.blacklist_country_keys.length) { | ||
| if ( | ||
| !data?.blacklist_country_keys || |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
| if (!data?.blacklist_country_keys.length) { | ||
| if ( | ||
| !data?.blacklist_country_keys || | ||
| !data?.blacklist_country_keys.length |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
| import getSettingsData from "../getSettingsData"; | ||
|
|
||
| const testSettingsData = { | ||
| whitelist_countries: [], |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
|
|
||
| test("handles setting custom whitelist countries", () => { | ||
| const changes = getSettingsChanges( | ||
| { whitelist_country_keys: true }, |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
| { whitelist_country_keys: true }, | ||
| { | ||
| territory_distribution_status: "custom", | ||
| whitelist_country_keys: "EN US FR", |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
| }, | ||
| ); | ||
|
|
||
| expect(changes.whitelist_countries).toEqual(["EN", "US", "FR"]); |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] whitelist may be insensitive, use allowlist instead
| ); | ||
|
|
||
| expect(changes.whitelist_countries).toEqual(["EN", "US", "FR"]); | ||
| expect(changes.blacklist_countries).toHaveLength(0); |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
| expect(changes.blacklist_countries).toHaveLength(0); | ||
| }); | ||
|
|
||
| test("handles removing custom blacklist countries", () => { |
There was a problem hiding this comment.
[Inclusive naming check] reported by reviewdog 🐶
[warning] blacklist may be insensitive, use denylist, blocklist instead
Done
Adds tests for publisher utils
How to QA
All tests should pass (except the inclusive naming check)
Testing