test(linter): add test case for no_unused_vars in 3b87ac4

This commit is contained in:
Boshen 2024-09-07 20:45:40 +08:00
parent 3b87ac48ce
commit 3835189785
No known key found for this signature in database
GPG key ID: 67715A371E534061

View file

@ -110,6 +110,7 @@ fn test_vars_simple() {
// type annotations do not get clobbered // type annotations do not get clobbered
("let x: number = 1; x = 2;", "let _x: number = 1; _x = 2;", None, FixKind::DangerousFix), ("let x: number = 1; x = 2;", "let _x: number = 1; _x = 2;", None, FixKind::DangerousFix),
("const { a } = obj;", "", None, FixKind::DangerousSuggestion), ("const { a } = obj;", "", None, FixKind::DangerousSuggestion),
("let [f,\u{a0}a]=p", "let [,a]=p", None, FixKind::DangerousSuggestion),
]; ];
Tester::new(NoUnusedVars::NAME, pass, fail) Tester::new(NoUnusedVars::NAME, pass, fail)