Skip to content

Commit

Permalink
fix: spell check
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Jan 5, 2024
1 parent e21d0ee commit 4f99903
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
9 changes: 3 additions & 6 deletions __tests__/unit/lib/metadata/MetadataRepositoryImpl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,11 @@ describe('MetadataRepositoryImpl', () => {
describe('when the metadata also as a parent folder', () => {
it('returns the parent folder with folder with sub folder with file', () => {
// Act
const result = sut.getFullyQualifiedName(
'Z force-app/main/objects/Account/fields/Test__c.field-meta.xml'
)
const fqn = 'objects/Account/fields/Test__c.field-meta.xml'
const result = sut.getFullyQualifiedName(`Z force-app/main/${fqn}`)

// Assert
expect(result).toStrictEqual(
'objectsAccountfieldsTest__c.field-meta.xml'
)
expect(result).toStrictEqual(fqn.split('/').join(''))
})
})

Expand Down
4 changes: 2 additions & 2 deletions src/metadata/MetadataRepositoryImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
METAFILE_SUFFIX,
OBJECT_TRANSLATION_TYPE,
OBJECT_TYPE,
RESTRICTIONRULE_TYPE,
RESTRICTION_RULE_TYPE,
SUB_OBJECT_TYPES,
TERRITORY_MODEL_TYPE,
} from '../utils/metadataConstants'
Expand Down Expand Up @@ -95,7 +95,7 @@ export class MetadataRepositoryImpl implements MetadataRepository {
}

private static TYPES_WITH_SUB_TYPES = [OBJECT_TYPE, TERRITORY_MODEL_TYPE, '']
private static EXTENSION_MATCHING_EXCEPTION = [RESTRICTIONRULE_TYPE]
private static EXTENSION_MATCHING_EXCEPTION = [RESTRICTION_RULE_TYPE]

private static COMPOSED_TYPES = [
OBJECT_TYPE,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/metadataConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const OBJECT_TRANSLATION_TYPE = 'objectTranslations'
export const OBJECT_TRANSLATION_META_XML_SUFFIX = `objectTranslation${METAFILE_SUFFIX}`
export const OBJECT_TYPE = 'objects'
export const OBJECT_XML_NAME = 'CustomObject'
export const RESTRICTIONRULE_TYPE = 'restrictionRules'
export const RESTRICTION_RULE_TYPE = 'restrictionRules'
export const SUB_OBJECT_TYPES = [
'businessProcesses',
'compactLayouts',
Expand Down

0 comments on commit 4f99903

Please sign in to comment.