mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 01:43:43 +00:00
refactor: avoid unnecessary computer property
This commit is contained in:
committed by
Carlos Valente
parent
8d526c7d31
commit
f928c1dc95
@@ -110,7 +110,7 @@ describe('sanitiseCustomFields()', () => {
|
||||
|
||||
it('label can not be empty', () => {
|
||||
const customFields: CustomFields = {
|
||||
['']: { label: '', type: 'string', colour: 'red' },
|
||||
'': { label: '', type: 'string', colour: 'red' },
|
||||
};
|
||||
const sanitationResult = sanitiseCustomFields(customFields);
|
||||
expect(sanitationResult).toStrictEqual({});
|
||||
@@ -133,7 +133,7 @@ describe('sanitiseCustomFields()', () => {
|
||||
test: { label: 'New Name', type: 'string', colour: 'red' },
|
||||
};
|
||||
const expectedCustomFields: CustomFields = {
|
||||
['new name']: { label: 'New Name', type: 'string', colour: 'red' },
|
||||
'new name': { label: 'New Name', type: 'string', colour: 'red' },
|
||||
};
|
||||
const sanitationResult = sanitiseCustomFields(customFields);
|
||||
expect(sanitationResult).toStrictEqual(expectedCustomFields);
|
||||
|
||||
Reference in New Issue
Block a user