Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test helper improvements #6156

Merged
merged 7 commits into from
Mar 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor test editor config
  • Loading branch information
dead10ck committed Mar 19, 2023
commit 923b0a7898091c5ff3bae37a37eedd981e19ee33
18 changes: 11 additions & 7 deletions helix-term/tests/test/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,19 @@ pub fn temp_file_with_contents<S: AsRef<str>>(
/// Generates a config with defaults more suitable for integration tests
pub fn test_config() -> Config {
merge_keys(Config {
editor: helix_view::editor::Config {
lsp: LspConfig {
enable: false,
..Default::default()
},
editor: test_editor_config(),
..Default::default()
})
}

pub fn test_editor_config() -> helix_view::editor::Config {
helix_view::editor::Config {
lsp: LspConfig {
enable: false,
..Default::default()
},
..Default::default()
})
}
}

/// Replaces all LF chars with the system's appropriate line feed
Expand Down Expand Up @@ -282,7 +286,7 @@ impl Default for AppBuilder {
fn default() -> Self {
Self {
args: Args::default(),
config: Config::default(),
config: test_config(),
syn_conf: test_syntax_conf(None),
input: None,
}
Expand Down