euv-cli 0.32.9

The official CLI tool for the euv UI framework, providing dev/release profiles with run/build modes, hot reload, and wasm-pack integration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

#[test]
fn internal_bootstrap_normalization_injects_once_and_is_idempotent() {
    let source: &str = "<!doctype html><html><body><main>fixture</main></body></html>";
    let normalized: String = normalize_bootstrap(source).unwrap();
    assert_eq!(normalized.matches(INLINE_JS_PLACEHOLDER).count(), 1);
    assert!(normalized.contains("<main>fixture</main>"));
    assert_eq!(normalize_bootstrap(&normalized).unwrap(), normalized);
}

#[test]
fn internal_bootstrap_normalization_rejects_duplicate_mount_scripts() {
    let source: String = format!("<body>{INLINE_JS_PLACEHOLDER}{INLINE_JS_PLACEHOLDER}</body>");
    assert!(normalize_bootstrap(&source).is_err());
}