rings-core 0.7.0

Chord DHT implementation with ICE
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use wasm_bindgen::JsCast;
use wasm_bindgen::JsValue;
use wasm_bindgen_test::wasm_bindgen_test;

use crate::utils::js_utils;

#[wasm_bindgen_test]
async fn test_window_sleep_not_panic() {
    js_utils::window_sleep(200).await.unwrap();
}

#[wasm_bindgen_test]
async fn test_global() {
    let obj = JsValue::from(js_sys::global());
    assert!(obj.has_type::<web_sys::Window>());
    assert!(!obj.has_type::<web_sys::WorkerGlobalScope>());
}