From 5516c7551f0b713497f8a568e9922de943fd5315 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:10:05 +0000 Subject: [PATCH] test(stdlib): add unit test for register_svg Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com> --- stdlib/src/svg.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/stdlib/src/svg.rs b/stdlib/src/svg.rs index 89fa46ba..aeb2ccc3 100644 --- a/stdlib/src/svg.rs +++ b/stdlib/src/svg.rs @@ -19,3 +19,21 @@ impl StdlibRegistry { ); } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_register_svg() { + let mut registry = StdlibRegistry::default(); + registry.register_svg(); + + assert!(registry.has_module("std.svg")); + let module = registry.get_module("std.svg").unwrap(); + assert_eq!(module.name, "std.svg"); + assert_eq!(module.version, "1.0.0"); + assert!(module.exports.is_empty()); + assert!(module.required_capabilities.is_empty()); + } +}