You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a test, the @salesforce scoped module imports will be automatically transpiled to provide a default value since the actual value would require a connection to an active app.
For example, import myMethod from '@salesforce/apex/FooController.fooMethod' will be automatically transpiled to define myMethod and set it's value to some reasonable default. In this case, myMethod will be a function that returns a resolved Promise.
Most (all?) of these @salesforce imports are not relevant to people not devloping on the Salesforce platform. We should pull these transforms out into a separate project and only apply them when tests are run on the platform.
W-6834501
The text was updated successfully, but these errors were encountered:
Agreed, all the @salesforce/ prefixed imports should be transformed by another transformer. In order to keep this project simple to maintain, what do you think about creating this transformer in this repository?
In a test, the
@salesforce
scoped module imports will be automatically transpiled to provide a default value since the actual value would require a connection to an active app.For example,
import myMethod from '@salesforce/apex/FooController.fooMethod'
will be automatically transpiled to definemyMethod
and set it's value to some reasonable default. In this case,myMethod
will be a function that returns a resolved Promise.Most (all?) of these
@salesforce
imports are not relevant to people not devloping on the Salesforce platform. We should pull these transforms out into a separate project and only apply them when tests are run on the platform.W-6834501
The text was updated successfully, but these errors were encountered: