mirror of
https://github.com/nushell/nushell.git
synced 2025-04-03 22:20:48 +02:00
Fix clippy lint (#13277)
# Description Fixes `items_after_test_module` lint.
This commit is contained in:
parent
69e4790b00
commit
e5cf4863e9
@ -61,22 +61,6 @@ fn execute_webpage(html: &str, span: Span) -> Result<Value, LabeledError> {
|
|||||||
Ok(value)
|
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
|
// revive nu-serde sketch
|
||||||
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
@ -476,3 +460,19 @@ impl<'a> serde::ser::SerializeTupleVariant for SeqSerializer<'a> {
|
|||||||
Ok(Value::list(self.seq, self.serializer.span))
|
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 New Issue
Block a user