diff options
author | Roj <ez@roj.im> | 2022-07-18 22:12:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 15:12:19 -0400 |
commit | 70d1ecaeaa7843b37e8ea5161b24988813b2f543 (patch) | |
tree | 011330b532ccd44320bf90c55c95b088467255bd /cli/args/mod.rs | |
parent | 1f04cea160071a296fc97a6bd50a2690521d70f6 (diff) |
feat(cli): support configuring the test tool in the config file (#15079)
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index accdeae7f..badfdc39d 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -14,6 +14,7 @@ pub use config_file::LintConfig; pub use config_file::LintRulesConfig; pub use config_file::MaybeImportsResult; pub use config_file::ProseWrap; +pub use config_file::TestConfig; pub use config_file::TsConfig; pub use flags::*; @@ -244,6 +245,14 @@ impl CliOptions { } } + pub fn to_test_config(&self) -> Result<Option<TestConfig>, AnyError> { + if let Some(config_file) = &self.maybe_config_file { + config_file.to_test_config() + } else { + Ok(None) + } + } + pub fn to_fmt_config(&self) -> Result<Option<FmtConfig>, AnyError> { if let Some(config) = &self.maybe_config_file { config.to_fmt_config() |