- Notifications
You must be signed in to change notification settings - Fork928
feat: Auto select workspace proxy based on lowest latency#7515
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
159538c
1305931
d1c9f3f
c739f24
ae26777
523e492
877c0c9
8d26643
5c534fa
a3703e1
c210e8d
a358258
ec860c3
3197eb1
ebb6a76
549093e
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
export const localStorageMock = () => { | ||
const store = {} as Record<string, string> | ||
return { | ||
getItem: (key: string):string =>{ | ||
return store[key] | ||
}, | ||
setItem: (key:string, value:string)=> { | ||
store[key] = value | ||
}, | ||
clear: ()=> { | ||
Object.keys(store).forEach((key) => { | ||
delete store[key] | ||
}) | ||
}, | ||
removeItem: (key: string) => { | ||
delete store[key] | ||
}, | ||
} | ||
} | ||
Object.defineProperty(window, "localStorage", { value: localStorageMock() }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Since this is being executed when the module is imported, maybe can be interesting to move all this code into the test setup file and mock it globally. We are doing that for a few default window interfaces. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. maybe, I just wanted to avoid putting things in the global if my test was the only one using it atm. |