feat: implement browser extension UI with WebAssembly integration

This commit is contained in:
Sameh Abouel-saad
2025-05-22 11:53:32 +03:00
parent 13945a8725
commit ed76ba3d8d
74 changed files with 7054 additions and 577 deletions

View File

@@ -31,3 +31,22 @@ async fn test_native_store_basic() {
let keys = store.keys().await.unwrap();
assert_eq!(keys.len(), 0);
}
#[tokio::test]
async fn test_native_store_persistence() {
let tmp_dir = tempfile::tempdir().unwrap();
let path = tmp_dir.path().join("persistdb");
let db_path = path.to_str().unwrap();
// First open, set value
{
let store = NativeStore::open(db_path).unwrap();
store.set("persist", b"value").await.unwrap();
}
// Reopen and check value
{
let store = NativeStore::open(db_path).unwrap();
let val = store.get("persist").await.unwrap();
assert_eq!(val, Some(b"value".to_vec()));
}
}