Skip to content

Commit cf7f4ca

Browse files
committed
Fix test
1 parent b5b2d6e commit cf7f4ca

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

crates/emmylua_code_analysis/src/diagnostic/test/unknown_doc_tag.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ mod tests {
77
#[test]
88
fn test_unknown_doc_tag() {
99
let mut ws = VirtualWorkspace::new();
10+
let mut emmyrc = ws.analysis.emmyrc.deref().clone();
11+
emmyrc
12+
.diagnostics
13+
.enables
14+
.push(DiagnosticCode::UnknownDocTag);
15+
ws.analysis.update_config(Arc::new(emmyrc));
1016
assert!(!ws.check_code_for(
1117
DiagnosticCode::UnknownDocTag,
1218
r#"

crates/emmylua_ls/src/handlers/test/code_actions_test.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#[cfg(test)]
22
mod tests {
33
use crate::handlers::test_lib::ProviderVirtualWorkspace;
4+
use emmylua_code_analysis::{DiagnosticCode, Emmyrc};
45
use lsp_types::CodeActionOrCommand;
56

67
#[test]
@@ -30,6 +31,12 @@ mod tests {
3031
#[test]
3132
fn test_add_doc_tag() {
3233
let mut ws = ProviderVirtualWorkspace::new();
34+
let mut emmyrc = Emmyrc::default();
35+
emmyrc
36+
.diagnostics
37+
.enables
38+
.push(DiagnosticCode::UnknownDocTag);
39+
ws.analysis.update_config(emmyrc.into());
3340
let actions = ws
3441
.check_code_action(
3542
r#"

0 commit comments

Comments
 (0)