From eae0f8def9e81ca629988338c4a15fc955d9ff8d Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 31 Aug 2023 08:50:43 -0500 Subject: [PATCH] More tests after self review --- src/rules/no_console.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/rules/no_console.rs b/src/rules/no_console.rs index 0da2d44b0..315732d66 100644 --- a/src/rules/no_console.rs +++ b/src/rules/no_console.rs @@ -59,8 +59,8 @@ mod tests { } #[test] - fn no_console_log_invalid() { - // Test cases where console.log is present + fn no_console_invalid() { + // Test cases where console is present assert_lint_err!( NoConsole, r#"console.log('Debug message');"#: [{ @@ -78,7 +78,15 @@ mod tests { r#"function log() { console.debug('Log'); }"#: [{ col: 17, message: MESSAGE, - }] + }], + r#"console;"#: [{ + col: 0, + message: MESSAGE, + }], + r#"console.warn("test");"#: [{ + col: 0, + message: MESSAGE, + }], ); } }