-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot-npm_and_yarn-minor-and-patch-e8d2…
…28ef11
- Loading branch information
Showing
21 changed files
with
537 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2024, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: MIT | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
import * as assert from 'assert'; | ||
import { suite, test } from 'mocha'; | ||
|
||
import { ValidatorManager } from '../validatorManager'; | ||
import { LOCAL_CHANGE_NOT_AWARE_MESSAGE } from '../diagnostic/js/adapters-local-change-not-aware'; | ||
|
||
suite('Diagnostics Test Suite - Server - ValidatorManager', () => { | ||
const validatorManager = ValidatorManager.createInstance(); | ||
const textDocument = TextDocument.create( | ||
'file://test.js', | ||
'javascript', | ||
1, | ||
` | ||
import { LightningElement, wire } from "lwc"; | ||
import { getRelatedListRecords } from "lightning/uiRelatedListApi"; | ||
export default class RelatedListRecords extends LightningElement { | ||
recordId = "0015g00000XYZABC"; | ||
relatedRecords; | ||
@wire(getRelatedListRecords, { | ||
parentRecordId: "$recordId", | ||
relatedListId: "Opportunities", | ||
fields: ["Opportunity.Name"], | ||
}) | ||
relatedListHandler({ error, data }) { | ||
} | ||
} | ||
` | ||
); | ||
|
||
test('Validate JS file with local change not aware adapter', async () => { | ||
const diagnostics = await validatorManager.validateDocument( | ||
{}, | ||
textDocument, | ||
'testExtension' | ||
); | ||
assert.equal(diagnostics.length, 1); | ||
assert.equal(diagnostics[0].message, LOCAL_CHANGE_NOT_AWARE_MESSAGE); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.