//! Belt-and-suspenders companion to the native `dropping_session_handle_clears_registry_entry`
//! test in `lib.rs`. This file exists for `wasm-pack test --node` symmetry; the
//! native test in the same crate is what gates CI.

use wasm_bindgen_test::wasm_bindgen_test;

use relicario_wasm::{__test_make_handle, __test_session_exists};

#[wasm_bindgen_test]
fn dropping_session_handle_clears_registry_entry() {
    let handle = __test_make_handle();
    let id = handle.value();
    assert!(__test_session_exists(id));
    drop(handle);
    assert!(!__test_session_exists(id));
}
