Skip to content

Commit

Permalink
More tests after self review
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Aug 31, 2023
1 parent 1af97a4 commit eae0f8d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/rules/no_console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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');"#: [{
Expand All @@ -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,
}],
);
}
}

0 comments on commit eae0f8d

Please sign in to comment.