mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: remove localStorage mock
which doesn't work in node v18.16.0 (#66671)
remove localStorage mock which doesn't work in node v18.16.0
This commit is contained in:
parent
1e53b29eee
commit
850f2baaf3
@ -6155,9 +6155,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/test/jest-setup.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/test/jest-shim.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
|
@ -65,26 +65,6 @@ jest.mock('../app/core/core', () => ({
|
||||
jest.mock('../app/angular/partials', () => ({}));
|
||||
jest.mock('../app/features/plugins/plugin_loader', () => ({}));
|
||||
|
||||
const localStorageMock = (() => {
|
||||
let store: any = {};
|
||||
return {
|
||||
getItem: (key: string) => {
|
||||
return store[key];
|
||||
},
|
||||
setItem: (key: string, value: any) => {
|
||||
store[key] = value.toString();
|
||||
},
|
||||
clear: () => {
|
||||
store = {};
|
||||
},
|
||||
removeItem: (key: string) => {
|
||||
delete store[key];
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
global.localStorage = localStorageMock;
|
||||
|
||||
const throwUnhandledRejections = () => {
|
||||
process.on('unhandledRejection', (err) => {
|
||||
throw err;
|
||||
|
Loading…
Reference in New Issue
Block a user