Skip to content

Commit

Permalink
test: fix missing wasm test
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI committed Mar 27, 2024
1 parent 107e7c1 commit ac63405
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions starknet-core/src/types/eth_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mod errors {
InvalidHexString,
}

#[derive(PartialEq, Debug)]
#[derive(Debug, PartialEq)]
pub struct FromFieldElementError;

#[derive(Debug)]
Expand Down Expand Up @@ -192,9 +192,10 @@ impl From<[u8; 20]> for EthAddress {

#[cfg(test)]
mod tests {
use super::EthAddress;
use crate::types::eth_address::FromFieldElementError;
use super::{EthAddress, FromFieldElementError};

use alloc::vec::*;

use hex_literal::hex;
use starknet_ff::FieldElement;

Expand Down Expand Up @@ -285,6 +286,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
#[should_panic(expected = "FromBytesSliceError")]
fn test_eth_address_from_slice_invalid_slice() {
let buffer: Vec<u8> = vec![0, 1, 2, 3, 4, 5, 6, 7];
Expand Down

0 comments on commit ac63405

Please sign in to comment.