-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix repeated test runs #8
Conversation
If you ran the tests several times, some things would be saved in localStorage, causing tests to possibly fail.
const array_to_set = arr => arr.reduce((s, v) => ({ ...s, [v]: true }), { }); | ||
|
||
export function index(state=default_state, action) { | ||
export function index(state=null, action) { | ||
if (state === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not no default argument for state
and just if (!state) {
? Also, this appears to be identical to what it was before except basically ignoring default arguments. Could you explain how this solved the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
===
> truthy compares imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this postpones talking to localStorage until the reducer is invoked.
ok looks good. ready to merge? |
Yes. |
Thanks! |
…noreDeprecations` Typescript Options (#10755) * save changes #1 * save changes #2 * save changes #3 * save changes #4 * save changes #5 * save changes #6 * save changes #7 * save changes #8 * fix image select * save changes #9 * save changes #10 * last issue is filtering * fix unit test by fixing button types * finally resolved all tsc errors * Added changeset: Remove `suppressImplicitAnyIndexErrors` and `ignoreDeprecations` Typescript Options * fix cypress feature flag util hopefully * another attemnpt to fix cypress feature flag util function * make image select close onSelect to match previous behavior * feedback @jaalah-akamai --------- Co-authored-by: Banks Nussman <banks@nussman.us>
…s_automation upcoming: [DI-20585] - Flow update for widget tests
…ode#8) * upcoming: [DI-20800] - Tooltip changes * upcoming: [DI-20800] - Tooltip and publishing the resource selection onClose from Autocomplete * upcoming: [DI-20800] - Resource Selection close state handling updates * upcoming: [DI-20800] - Tooltip code refactoring * upcoming: [DI-20800] - Tooltip code refactoring * upcoming: [DI-20800] - Global Filters * upcoming: [DI-20800] - As per dev * upcoming: [DI-20800] - Code clean up and refactoring * upcoming: [DI-20800] - UT fixes * upcoming: [DI-20800] - Code clean up and review comments --------- Co-authored-by: vmangalr <vmangalr@akamai.com>
If you ran the tests several times, some things would be saved in
localStorage, causing tests to possibly fail.