forked from runem/lit-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an integration test of completions. (runem#232)
* Add an integration test of completions. * Clarify the completions fixture file Also put the completion locations in a single, easier-to-update place in the code. * Also open our test vscode to the fixtures dir This way we can, in the future, add settings and such to a .vscode directory there. Also makes debugging a bit nicer. * Use path join more Hoping to fix windows test * Don't throw when failing to write to log file.
- Loading branch information
Showing
4 changed files
with
86 additions
and
3 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
31 changes: 31 additions & 0 deletions
31
packages/vscode-lit-plugin/src/test/fixtures/completions.ts
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,31 @@ | ||
// Pretending this is the Lit html function | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
declare const html: any; | ||
|
||
/** An element to test autocomplete with. */ | ||
class CompleteMe extends HTMLElement { | ||
/** Docs for prop 1. */ | ||
prop1 = ""; | ||
/** Docs for prop 2. */ | ||
prop2 = ""; | ||
/** Docs for prop 3. */ | ||
prop3 = ""; | ||
} | ||
customElements.define("complete-me", CompleteMe); | ||
declare global { | ||
interface HTMLElementTagNameMap { | ||
"complete-me": CompleteMe; | ||
} | ||
} | ||
|
||
// These lines are used as a basis for testing completions, with hardcoded | ||
// line and character offsets in the test file. So if you change this file, | ||
// you'll likely need to update those offsets in ../simple-test.ts | ||
html` | ||
<complete-me | ||
></complete-me> | ||
<com | ||
`; | ||
|
||
export {}; |
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