mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-31 23:58:50 +01:00
📱fix: set initial nav visibility for small screens (#3208)
* fix: hide nav on small screens by default * test: add spec for Nav component
This commit is contained in:
parent
81292bb4dd
commit
b8f2bee3fc
4 changed files with 136 additions and 0 deletions
21
client/test/localStorage.mock
Normal file
21
client/test/localStorage.mock
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
let store = {};
|
||||
Object.defineProperty(window, 'localStorage', {
|
||||
writable: true,
|
||||
value: {
|
||||
getItem: jest.fn().mockImplementation((key) => {
|
||||
if(key in store) {
|
||||
return store[key];
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
setItem: jest.fn().mockImplementation((key, value) => {
|
||||
store[key] = value.toString();
|
||||
}),
|
||||
clear: jest.fn().mockImplementation(() => {
|
||||
store = {};
|
||||
}),
|
||||
removeItem: jest.fn().mockImplementation(() => {
|
||||
delete store[key];
|
||||
}),
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue