pub struct LeptosTestApp { /* private fields */ }Expand description
A running Leptos test app process.
The app process is terminated automatically when this value is dropped. This relies on
TerminateOnDrop, which requires an active multithreaded Tokio runtime.
Browser tests should use #[tokio::test(flavor = "multi_thread")].
Implementations§
Source§impl LeptosTestApp
impl LeptosTestApp
Sourcepub async fn serve(
app_dir: impl Into<PathBuf>,
) -> Result<Self, Report<LeptosBrowserTestError>>
pub async fn serve( app_dir: impl Into<PathBuf>, ) -> Result<Self, Report<LeptosBrowserTestError>>
Sourcepub fn base_url(&self) -> &str
pub fn base_url(&self) -> &str
The base URL, for example http://127.0.0.1:3000 or https://127.0.0.1:3000.
Sourcepub const fn reload_port(&self) -> u16
pub const fn reload_port(&self) -> u16
The reload port passed through LEPTOS_RELOAD_PORT.
Auto Trait Implementations§
impl Freeze for LeptosTestApp
impl !RefUnwindSafe for LeptosTestApp
impl Send for LeptosTestApp
impl Sync for LeptosTestApp
impl Unpin for LeptosTestApp
impl UnsafeUnpin for LeptosTestApp
impl !UnwindSafe for LeptosTestApp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more