veilid-core 0.5.3

Core library used to create a Veilid node and operate it as part of an application
Documentation
//! Test suite for the Web and headless browsers.
#![cfg(all(target_arch = "wasm32", target_os = "unknown"))]
#![recursion_limit = "256"]

use tracing::*;
use veilid_core::tests::*;
use veilid_tools::parking_lot::Once;
use wasm_bindgen_test::*;

wasm_bindgen_test_configure!(run_in_browser);

static SETUP_ONCE: Once = Once::new();

pub fn setup() -> () {
    SETUP_ONCE.call_once(|| {
        console_error_panic_hook::set_once();

        let config = veilid_tracing_wasm::WASMLayerConfig::new()
            .with_report_logs_in_timings(false)
            .with_max_level(Level::INFO)
            .with_console_config(veilid_tracing_wasm::ConsoleConfig::ReportWithoutConsoleColor);
        veilid_tracing_wasm::set_as_global_default_with_config(config);
    });
}

#[wasm_bindgen_test]
async fn wasm_run_all_tests() {
    setup();
    run_all_tests().await;
}