function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NaziNazi 

Test class for Aura component

Is there any test class for aura component in salesforce lightning? If not can i able to push my code to production without writing test classes?
Best Answer chosen by Nazi
sfdcMonkey.comsfdcMonkey.com
welcome but consider this if you create lightning app for upload app excahnge then you must write a test class for your apex controller
go to below link for reference
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/apps_packaging_tests.htm
and its also good practice that write test class for every apex class
Thanks
 

All Answers

sfdcMonkey.comsfdcMonkey.com
hi nazlr
In lightning document they have not mentioned any unit test for controller and helper. In salesforce, test class is only available for apex controller to do the unit testing
Thanks
Mark it best answer if it helps you so it make proper solution for other
NaziNazi
Thank u Soni piyush.I saw your previous replies.But i need to know whether i can able to push it without test classes?
sfdcMonkey.comsfdcMonkey.com
yes push it :)
NaziNazi
Thank you 
sfdcMonkey.comsfdcMonkey.com
welcome but consider this if you create lightning app for upload app excahnge then you must write a test class for your apex controller
go to below link for reference
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/apps_packaging_tests.htm
and its also good practice that write test class for every apex class
Thanks
 
This was selected as the best answer