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:
Ashley Harrison 2023-04-17 14:40:32 +01:00 committed by GitHub
parent 1e53b29eee
commit 850f2baaf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 23 deletions

View File

@ -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"],

View File

@ -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;