I have created unlocked package with all of necessary meta data. The problem is I've test class which content code with different object fields and to create package it's asking to add those fields in object folder. I don't want to add these custom fields in my unlocked package as it's not my feature.
Ex test class
Public class objectUtilTest{
static Account setupAccount(String name, String customField) {
Account objSetupAccount = new Account () ;
objSetupAccount.Name = name;
objSetupAccount.customField__c = customField
}
//some test methods for my feature
}
Here Account has custom field called customField__c. Which is used in my feature test class.
In order to create package I've to add Account object meta data like below:
ProjectDirectory..
|__ force-app
|__default
|__main
|__objects
|__Account
|__customField meta data
I don't want to add Account meta data in my package. Is there any way someone can suggest.