mirror of
https://github.com/nushell/nushell
synced 2025-01-13 21:55:07 +00:00
Fix clippy lint (#13277)
# Description Fixes `items_after_test_module` lint.
This commit is contained in:
parent
69e4790b00
commit
e5cf4863e9
1 changed files with 16 additions and 16 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue