This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rome_cli): fix regression for
rome lsp-proxy
command (#4491)
- Loading branch information
Showing
5 changed files
with
52 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use crate::run_cli; | ||
use crate::snap_test::{assert_cli_snapshot, SnapshotPayload}; | ||
use bpaf::Args; | ||
use rome_console::BufferConsole; | ||
use rome_fs::MemoryFileSystem; | ||
use rome_service::DynRef; | ||
|
||
#[test] | ||
fn lsp_proxy_help() { | ||
let mut fs = MemoryFileSystem::default(); | ||
let mut console = BufferConsole::default(); | ||
|
||
let result = run_cli( | ||
DynRef::Borrowed(&mut fs), | ||
&mut console, | ||
Args::from(&[("lsp-proxy"), "--help"]), | ||
); | ||
|
||
assert!(result.is_ok(), "run_cli returned {result:?}"); | ||
|
||
assert_cli_snapshot(SnapshotPayload::new( | ||
module_path!(), | ||
"lsp_proxy_help", | ||
fs, | ||
console, | ||
result, | ||
)); | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ mod check; | |
mod ci; | ||
mod format; | ||
mod init; | ||
mod lsp_proxy; | ||
mod migrate; | ||
mod rage; | ||
mod version; |
16 changes: 16 additions & 0 deletions
16
crates/rome_cli/tests/snapshots/main_commands_lsp_proxy/lsp_proxy_help.snap
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,16 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
# Emitted Messages | ||
|
||
```block | ||
Acts as a server for the Language Server Protocol over stdin/stdout | ||
Available options: | ||
-h, --help Prints help information | ||
``` | ||
|
||
|