Skip to content

Commit

Permalink
fix(test-utils): correct openUntitledDocument params order
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 25, 2024
1 parent 7e8bc50 commit 3215b59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/test-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The returned server handle provides several methods to interact with the languag

- `initialize(rootUri: string, initializationOptions: InitializationOptions)`: Initializes the language server.
- `openTextDocument(fileName: string, languageId: string)`: Opens a text document.
- `openUntitledDocument(content: string, languageId: string)`: Opens an untitled text document.
- `openUntitledDocument(languageId: string, content: string)`: Opens an untitled text document.
- `closeTextDocument(uri: string)`: Closes a text document.
- Various `send*Request` methods: Send language-related requests to the server.

Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function startLanguageServer(serverModule: string, cwd?: string | URL) {
}
return openedDocuments.get(uri)!;
},
async openUntitledDocument(content: string, languageId: string) {
async openUntitledDocument(languageId: string, content: string) {
const uri = URI.from({ scheme: 'untitled', path: `Untitled-${untitledCounter++}` }).toString();
const document = TextDocument.create(uri, languageId, 0, content);
openedDocuments.set(uri, document);
Expand Down

0 comments on commit 3215b59

Please sign in to comment.