MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / assert_ui

Function assert_ui

crates/cargo-lambda-cli/tests/harness/project.rs:277–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275}
276
277pub(crate) fn assert_ui() -> snapbox::Assert {
278 let root = paths::root();
279 // Use `from_file_path` instead of `from_dir_path` so the trailing slash is
280 // put in the users output, rather than hidden in the variable
281 let root_url = url::Url::from_file_path(&root).unwrap().to_string();
282 let root = root.display().to_string();
283
284 let mut subs = snapbox::Substitutions::new();
285 subs.extend([
286 (
287 "[EXE]",
288 std::borrow::Cow::Borrowed(std::env::consts::EXE_SUFFIX),
289 ),
290 ("[ROOT]", std::borrow::Cow::Owned(root)),
291 ("[ROOTURL]", std::borrow::Cow::Owned(root_url)),
292 ])
293 .unwrap();
294 snapbox::Assert::new()
295 .action_env(snapbox::DEFAULT_ACTION_ENV)
296 .substitutions(subs)
297}

Callers 1

cargo_lambdaMethod · 0.85

Calls 2

rootFunction · 0.85
newFunction · 0.85

Tested by

no test coverage detected