@@ -137,66 +137,4 @@ describe('when parsing custom field metadata', () => {
137137
138138 expect ( E . isLeft ( result ) ) . toBe ( true ) ;
139139 } ) ;
140-
141- test ( 'An error is returned when the CustomField key is not an object' , async ( ) => {
142- const unparsed : UnparsedCustomFieldBundle = {
143- type : 'customfield' ,
144- name : 'PhotoUrl__c' ,
145- parentName : 'MyFirstObject__c' ,
146- filePath : 'src/field/PhotoUrl__c.field-meta.xml' ,
147- content : `
148- <?xml version="1.0" encoding="UTF-8"?>
149- <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">invalid</CustomField>` ,
150- } ;
151-
152- const result = await reflectCustomFieldSources ( [ unparsed ] ) ( ) ;
153-
154- expect ( E . isLeft ( result ) ) . toBe ( true ) ;
155- } ) ;
156-
157- test ( 'An error is returned when the CustomKey object does not contain the label key' , async ( ) => {
158- const unparsed : UnparsedCustomFieldBundle = {
159- type : 'customfield' ,
160- name : 'PhotoUrl__c' ,
161- parentName : 'MyFirstObject__c' ,
162- filePath : 'src/field/PhotoUrl__c.field-meta.xml' ,
163- content : `
164- <?xml version="1.0" encoding="UTF-8"?>
165- <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
166- <fullName>PhotoUrl__c</fullName>
167- <externalId>false</externalId>
168- <required>false</required>
169- <trackFeedHistory>false</trackFeedHistory>
170- <type>Url</type>
171- <description>A Photo URL field</description>
172- </CustomField>` ,
173- } ;
174-
175- const result = await reflectCustomFieldSources ( [ unparsed ] ) ( ) ;
176-
177- expect ( E . isLeft ( result ) ) . toBe ( true ) ;
178- } ) ;
179-
180- test ( 'An error is returned when the CustomKey object does not contain the type key' , async ( ) => {
181- const unparsed : UnparsedCustomFieldBundle = {
182- type : 'customfield' ,
183- name : 'PhotoUrl__c' ,
184- parentName : 'MyFirstObject__c' ,
185- filePath : 'src/field/PhotoUrl__c.field-meta.xml' ,
186- content : `
187- <?xml version="1.0" encoding="UTF-8"?>
188- <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
189- <fullName>PhotoUrl__c</fullName>
190- <externalId>false</externalId>
191- <label>PhotoUrl</label>
192- <required>false</required>
193- <trackFeedHistory>false</trackFeedHistory>
194- <description>A Photo URL field</description>
195- </CustomField>` ,
196- } ;
197-
198- const result = await reflectCustomFieldSources ( [ unparsed ] ) ( ) ;
199-
200- expect ( E . isLeft ( result ) ) . toBe ( true ) ;
201- } ) ;
202140} ) ;
0 commit comments