mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
More fixes
This commit is contained in:
parent
6790090b90
commit
96c2fd9988
|
@ -1141,6 +1141,8 @@ describe('instrument', () => {
|
|||
const importMonitoredLiftedStore = importMonitoredStore.liftedStore;
|
||||
|
||||
const noComputedExportedState = Object.assign({}, exportedState);
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
delete noComputedExportedState.computedStates;
|
||||
|
||||
importMonitoredLiftedStore.dispatch(
|
||||
|
@ -1184,6 +1186,8 @@ describe('instrument', () => {
|
|||
state: LiftedState<S, A, null>
|
||||
) {
|
||||
state.actionsById = _.mapValues(state.actionsById, (action) => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
delete action.timestamp;
|
||||
delete action.stack;
|
||||
return action;
|
||||
|
|
|
@ -3,7 +3,6 @@ import { compose, createStore } from 'redux';
|
|||
|
||||
describe('persistState', () => {
|
||||
const savedLocalStorage = global.localStorage;
|
||||
delete global.localStorage;
|
||||
|
||||
beforeEach(() => {
|
||||
global.localStorage = {
|
||||
|
@ -119,7 +118,9 @@ describe('persistState', () => {
|
|||
const spy = jest.spyOn(console, 'warn').mockImplementation(() => {
|
||||
// noop
|
||||
});
|
||||
delete global.localStorage.getItem;
|
||||
global.localStorage.getItem = () => {
|
||||
throw new Error();
|
||||
};
|
||||
createStore(reducer, compose(instrument(), persistState('id')));
|
||||
|
||||
expect(spy.mock.calls[0]).toContain(
|
||||
|
@ -133,7 +134,9 @@ describe('persistState', () => {
|
|||
const spy = jest.spyOn(console, 'warn').mockImplementation(() => {
|
||||
// noop
|
||||
});
|
||||
delete global.localStorage.setItem;
|
||||
global.localStorage.setItem = () => {
|
||||
throw new Error();
|
||||
};
|
||||
const store = createStore(
|
||||
reducer,
|
||||
compose(instrument(), persistState('id'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user