Clone in a terminal:
simple.rs
tests/ - Another attribute test
use kaja_web::{get_cookie_value, set_cookie_value}; use wasm_bindgen_test::*; wasm_bindgen_test_configure!(run_in_browser); #[wasm_bindgen_test] fn test_dom() { let window = web_sys::window().unwrap(); let document = window.document().unwrap(); assert!(document.body().is_some()); } #[wasm_bindgen_test] fn test_cookie() { set_cookie_value("test-cookie-value", "some-value").unwrap(); let val = get_cookie_value("test-cookie-value").unwrap(); assert_eq!(val, "some-value"); let not_in_cookie = get_cookie_value("not-in-cookie"); assert!(not_in_cookie.is_none()); }

File history (3 commits)

3d5115c Johan Mattsson - johan.mattsson.m@gmail.com
Another attribute test
Another attribute test
78dd432 Johan Mattsson - johan.mattsson.m@gmail.com
New component idea
New component idea
b678d76 Johan Mattsson - johan.mattsson.m@gmail.com
More tests
More tests

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112