1 vote

Test Code Coverage - Delete DML catch block

You can use the Test.isRunningTest method to check if the code is running in a test context and then throw a custom exception. For example, you can modify your main class code like this: @AuraEnabled ...
Tushar Jadav's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible