Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added deepFreeze to not pollute global mock data - Part 11 #2927

Merged
merged 3 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import deepFreeze from 'deep-freeze-strict';

import { cloneDeep } from 'lodash';
import { CustomFieldTypes } from 'src/app/core/enums/platform/v1/custom-fields-type.enum';
import { AdvanceRequestState } from 'src/app/core/models/advance-request-state.model';
import { AdvanceRequestPlatform } from 'src/app/core/models/platform/advance-request-platform.model';
import { PlatformApiResponse } from 'src/app/core/models/platform/platform-api-response.model';

export const advanceRequestPlatform: PlatformApiResponse<AdvanceRequestPlatform> = {
export const advanceRequestPlatform: PlatformApiResponse<AdvanceRequestPlatform> = deepFreeze({
count: 1,
offset: 0,
data: [
Expand Down Expand Up @@ -87,9 +88,9 @@ export const advanceRequestPlatform: PlatformApiResponse<AdvanceRequestPlatform>
],
},
],
};
});

export const advanceRequestPlatformPulledBack: PlatformApiResponse<AdvanceRequestPlatform> = {
export const advanceRequestPlatformPulledBack: PlatformApiResponse<AdvanceRequestPlatform> = deepFreeze({
count: 1,
offset: 0,
data: [
Expand All @@ -99,9 +100,9 @@ export const advanceRequestPlatformPulledBack: PlatformApiResponse<AdvanceReques
id: 'areqiwr3Wwirl',
},
],
};
});

export const advanceRequestPlatformSentBack: PlatformApiResponse<AdvanceRequestPlatform> = {
export const advanceRequestPlatformSentBack: PlatformApiResponse<AdvanceRequestPlatform> = deepFreeze({
count: 1,
offset: 0,
data: [
Expand All @@ -111,4 +112,4 @@ export const advanceRequestPlatformSentBack: PlatformApiResponse<AdvanceRequestP
state: 'SENT_BACK',
},
],
};
});
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import deepFreeze from 'deep-freeze-strict';

import { ExpenseDuplicateSet } from 'src/app/core/models/platform/v1/expense-duplicate-sets.model';

export const expenseDuplicateSet: ExpenseDuplicateSet = {
export const expenseDuplicateSet: ExpenseDuplicateSet = deepFreeze({
expense_ids: ['tx5fBcPBAxLv', 'tx3nHShG60zq'],
};
});

export const expenseDuplicateSet2: ExpenseDuplicateSet = {
export const expenseDuplicateSet2: ExpenseDuplicateSet = deepFreeze({
expense_ids: ['tx5fBcPBAxLv'],
};
});

export const expenseDuplicateSet3: ExpenseDuplicateSet = {
export const expenseDuplicateSet3: ExpenseDuplicateSet = deepFreeze({
expense_ids: ['txal5xGjbZ1R'],
};
});

export const expenseDuplicateSets: ExpenseDuplicateSet[] = [
export const expenseDuplicateSets: ExpenseDuplicateSet[] = deepFreeze([
{ expense_ids: ['tx3I0ccSGlhg', 'txvAmVCGZUZi'] },
{ expense_ids: ['tx3rq5G9gzgf', 'txS1cDov9iZn'] },
{ expense_ids: ['tx6KauIKfjdJ', 'txT0ZmCrVOiD'] },
Expand All @@ -30,4 +32,4 @@ export const expenseDuplicateSets: ExpenseDuplicateSet[] = [
{ expense_ids: ['txjh5iDt7xXO', 'txkJsHIF6a9X'] },
{ expense_ids: ['txT0ZmCrVOiD', 'txws78AoalC9'] },
{ expense_ids: ['txT0ZmCrVOiD', 'txzjWIcqYxa9'] },
];
]);
Loading
Loading