Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Mar 21, 2024
1 parent cae78e1 commit b141ce6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/account_sdk/src/tests/webauthn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async fn test_verify_webauthn_explicit() {

Check warning on line 65 in crates/account_sdk/src/tests/webauthn/mod.rs

View workflow job for this annotation

GitHub Actions / fmt

Diff in /home/runner/work/cairo-webauthn/cairo-webauthn/crates/account_sdk/src/tests/webauthn/mod.rs
let challenge = felt!("0x0169af1f6f99d35e0b80e0140235ec4a2041048868071a8654576223934726f5");
let challenge_bytes = challenge.to_bytes_be().to_vec();
let response = data.signer.sign(&challenge_bytes).await;
let response = data.signer.sign(&challenge_bytes).await.expect("signer error");

let args = VerifyWebauthnSignerArgs::from_response(origin, challenge_bytes, response.clone());

Expand Down
14 changes: 7 additions & 7 deletions crates/account_sdk/src/webauthn_signer/signers/p256r1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ impl P256VerifyingKeyConverter {
}
}

// #[tokio::test]
// async fn test_signer() {
// let rp_id = "https://localhost:8080".to_string();
// let signer = P256r1Signer::random(rp_id);
// let calldata = signer.sign("842903840923".as_bytes()).await;
// dbg!(&calldata);
// }
#[tokio::test]

Check failure on line 86 in crates/account_sdk/src/webauthn_signer/signers/p256r1.rs

View workflow job for this annotation

GitHub Actions / ensure-wasm

failed to resolve: use of undeclared crate or module `tokio`
async fn test_signer() {
let rp_id = "https://localhost:8080".to_string();
let signer = P256r1Signer::random(rp_id);
let calldata = signer.sign("842903840923".as_bytes()).await.unwrap();
dbg!(&calldata);
}

0 comments on commit b141ce6

Please sign in to comment.