Skip to content

Commit

Permalink
test wip
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Jan 14, 2025
1 parent 1d7e5d4 commit 3d8fad9
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions xmtp_mls/src/groups/device_sync/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,48 @@ impl From<BackupOptions> for BackupMetadata {
}
}
}

#[cfg(test)]
mod tests {
#[cfg(target_arch = "wasm32")]
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_dedicated_worker);
use std::sync::Arc;

use backup_exporter::BackupExporter;
use wasm_bindgen_test::wasm_bindgen_test;
use xmtp_cryptography::utils::generate_local_wallet;

use crate::{builder::ClientBuilder, groups::GroupMetadataOptions};

use super::*;

#[wasm_bindgen_test(unsupported = tokio::test(flavor = "multi_thread", worker_threads = 1))]
#[cfg_attr(target_family = "wasm", ignore)]
async fn test_consent_sync() {
let alix_wallet = generate_local_wallet();
let alix = ClientBuilder::new_test_client(&alix_wallet).await;
let alix_provider = Arc::new(alix.mls_provider().unwrap());

let bo_wallet = generate_local_wallet();
let bo = ClientBuilder::new_test_client(&bo_wallet).await;

// alix.();
let alix_group = alix
.create_group(None, GroupMetadataOptions::default())
.unwrap();
alix_group
.add_members_by_inbox_id(&[bo.inbox_id()])
.await
.unwrap();
alix_group.send_message(b"hello there").await.unwrap();

let opts = BackupOptions {
start_ns: None,
end_ns: None,
elements: vec![BackupElementSelection::Messages],
};

let exporter = BackupExporter::new(opts, &alix_provider);
let tempdir = tempfile::TempDir::new().unwrap();
}
}

0 comments on commit 3d8fad9

Please sign in to comment.