Skip to content

Commit

Permalink
fix: use cloneDeep
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptodev-2s committed Nov 29, 2024
1 parent f7cad9b commit e9322d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/scripts/migrations/134.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { cloneDeep } from 'lodash';
import { migrate, version } from './134';

const oldVersion = 133;
Expand All @@ -23,7 +24,7 @@ describe(`migration #${version}`, () => {

const transformedState = await migrate({
meta: { version: oldVersion },
data: { ...oldState },
data: cloneDeep(oldState),
});

expect(transformedState.data).toStrictEqual(oldState);
Expand All @@ -47,7 +48,7 @@ describe(`migration #${version}`, () => {
};
const transformedState = await migrate({
meta: { version: oldVersion },
data: { ...oldState },
data: cloneDeep(oldState),
});

delete oldState.AppStateController.usedNetworks;
Expand Down

0 comments on commit e9322d8

Please sign in to comment.