Skip to content

Commit

Permalink
Add missing example
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Apr 4, 2024
1 parent 7fe5104 commit a15497f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion core/engine/src/module/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ use super::Module;
///
/// # Examples
/// ```
///
/// # use std::path::Path;
/// # use boa_engine::{Context, js_string};
/// # use boa_engine::module::resolve_module_specifier;
/// assert_eq!(
/// resolve_module_specifier(
/// Some(Path::new("/base")),
/// &js_string!("../a.js"),
/// Some(Path::new("/base/hello/ref.js")),
/// &mut Context::default()
/// ),
/// Ok("/base/a.js".into())
/// );
/// ```
pub fn resolve_module_specifier(
base: Option<&Path>,
Expand Down

0 comments on commit a15497f

Please sign in to comment.