Skip to content

Commit

Permalink
Clone deep migration test inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
gambinish committed Aug 29, 2024
1 parent 2bcf315 commit e8491d8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions app/scripts/migrations/121.2.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { cloneDeep } from 'lodash';
import { migrate, version } from './121.2';

const oldVersion = 121.1;
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 Down Expand Up @@ -60,7 +61,7 @@ describe(`migration #${version}`, () => {

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

expect(transformedState.data).toStrictEqual(expectedState);
Expand Down Expand Up @@ -97,7 +98,7 @@ describe(`migration #${version}`, () => {

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

expect(transformedState.data).toStrictEqual(expectedState);
Expand Down Expand Up @@ -148,7 +149,7 @@ describe(`migration #${version}`, () => {

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

expect(transformedState.data).toStrictEqual(expectedState);
Expand Down Expand Up @@ -178,7 +179,7 @@ describe(`migration #${version}`, () => {

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

expect(transformedState.data).toStrictEqual(oldState);
Expand Down Expand Up @@ -211,7 +212,7 @@ describe(`migration #${version}`, () => {

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

expect(transformedState.data).toStrictEqual(expectedState);
Expand All @@ -232,7 +233,7 @@ describe(`migration #${version}`, () => {

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

expect(transformedState.data).toStrictEqual(oldState);
Expand Down Expand Up @@ -265,7 +266,7 @@ describe(`migration #${version}`, () => {

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

expect(transformedState.data).toStrictEqual(expectedState);
Expand Down

0 comments on commit e8491d8

Please sign in to comment.