We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4480ff5 commit 0fe22bfCopy full SHA for 0fe22bf
1 file changed
apps/web/src/terminalStateStore.test.ts
@@ -8,10 +8,11 @@ const TERMINAL_STATE_STORAGE_KEY = "t3code:terminal-state:v1";
8
9
describe("terminalStateStore actions", () => {
10
beforeEach(() => {
11
- if (typeof localStorage?.clear === "function") {
12
- localStorage.clear();
13
- } else if (typeof localStorage?.removeItem === "function") {
14
- localStorage.removeItem(TERMINAL_STATE_STORAGE_KEY);
+ const storage = globalThis.localStorage;
+ if (typeof storage?.clear === "function") {
+ storage.clear();
+ } else if (typeof storage?.removeItem === "function") {
15
+ storage.removeItem(TERMINAL_STATE_STORAGE_KEY);
16
}
17
useTerminalStateStore.setState({ terminalStateByThreadId: {} });
18
});
0 commit comments