Skip to content

Commit

Permalink
Valid test.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfdctaka committed May 16, 2024
1 parent d1dac5a commit ec1d1fb
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion test/rules/apex/apex-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,30 @@ const ruleTester = new RuleTester({
});

ruleTester.run('@salesforce/lwc-mobile/apex/apex-import', apexImport, {
valid: [],
valid: [
{
code: `
import { LightningElement, wire } from 'lwc';
import getContactList from 'ContactController.getContactList';
export default class ApexWireMethodToFunction extends LightningElement {
contacts;
error;
@wire(getContactList)
wiredContacts({ error, data }) {
if (data) {
this.contacts = data;
this.error = undefined;
} else if (error) {
this.error = error;
this.contacts = undefined;
}
}
}
`
}
],
invalid: [
{
code: `
Expand Down

0 comments on commit ec1d1fb

Please sign in to comment.