Fix clippy lint (#13277)

# Description
Fixes `items_after_test_module` lint.
This commit is contained in:
Ian Manske 2024-06-30 23:28:09 +00:00 committed by GitHub
parent 69e4790b00
commit e5cf4863e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,22 +61,6 @@ fn execute_webpage(html: &str, span: Span) -> Result<Value, LabeledError> {
Ok(value)
}
#[cfg(test)]
mod tests {
use super::*;
const HTML: &str = r#"
<html><head><meta><title>My Title</title></head></html>
"#;
#[test]
fn test_basics() {
let info = execute_webpage(HTML, Span::test_data()).unwrap();
let record = info.as_record().unwrap();
assert_eq!(record.get("title").unwrap().as_str().unwrap(), "My Title");
}
}
// revive nu-serde sketch
use serde::Serialize;
@ -476,3 +460,19 @@ impl<'a> serde::ser::SerializeTupleVariant for SeqSerializer<'a> {
Ok(Value::list(self.seq, self.serializer.span))
}
}
#[cfg(test)]
mod tests {
use super::*;
const HTML: &str = r#"
<html><head><meta><title>My Title</title></head></html>
"#;
#[test]
fn test_basics() {
let info = execute_webpage(HTML, Span::test_data()).unwrap();
let record = info.as_record().unwrap();
assert_eq!(record.get("title").unwrap().as_str().unwrap(), "My Title");
}
}