veilid/veilid-core/tests/node.rs

84 lines
1.5 KiB
Rust
Raw Normal View History

2021-11-22 16:28:30 +00:00
//! Test suite for NodeJS
#![cfg(target_arch = "wasm32")]
use veilid_core::tests::common::*;
use veilid_core::xx::*;
use wasm_bindgen_test::*;
wasm_bindgen_test_configure!();
2022-03-15 13:33:34 +00:00
extern crate wee_alloc;
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
2021-11-22 16:28:30 +00:00
static SETUP_ONCE: Once = Once::new();
pub fn setup() -> () {
SETUP_ONCE.call_once(|| {
console_error_panic_hook::set_once();
2022-06-09 00:07:26 +00:00
wasm_logger::init(wasm_logger::Config::new(log::Level::Trace));
2021-11-22 16:28:30 +00:00
});
}
#[wasm_bindgen_test]
async fn run_test_dht_key() {
setup();
test_dht_key::test_all().await;
}
#[wasm_bindgen_test]
async fn run_test_host_interface() {
setup();
test_host_interface::test_all().await;
}
#[wasm_bindgen_test]
async fn run_test_veilid_core() {
setup();
test_veilid_core::test_all().await;
}
#[wasm_bindgen_test]
async fn run_test_config() {
setup();
test_veilid_config::test_all().await;
}
#[wasm_bindgen_test]
async fn run_test_connection_table() {
setup();
test_connection_table::test_all().await;
}
#[wasm_bindgen_test]
async fn run_test_table_store() {
setup();
test_table_store::test_all().await;
}
#[wasm_bindgen_test]
async fn run_test_crypto() {
setup();
test_crypto::test_all().await;
}
#[wasm_bindgen_test]
async fn run_test_envelope_receipt() {
setup();
test_envelope_receipt::test_all().await;
}
2022-10-02 22:47:36 +00:00
#[wasm_bindgen_test]
async fn run_test_async_tag_lock() {
setup();
test_async_tag_lock::test_all().await;
}