File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
emmylua_code_analysis/src/diagnostic/test
emmylua_ls/src/handlers/test Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff 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#"
Original file line number Diff line number Diff line change 11#[ cfg( test) ]
22mod 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#"
You can’t perform that action at this time.
0 commit comments