Skip to content

Commit

Permalink
Add unit test for nep141-locker and omni-types (#100)
Browse files Browse the repository at this point in the history
* Add unit test for nep141-locker.

* Move tests to a separate file.

* Add test for `is_transfer_finalised`.

* Added some tests for OmniTypes.
  • Loading branch information
kisialiou authored Nov 4, 2024
1 parent a0fa6a0 commit 537e93f
Show file tree
Hide file tree
Showing 8 changed files with 1,253 additions and 29 deletions.
60 changes: 60 additions & 0 deletions near/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions near/nep141-locker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ borsh.workspace = true
serde.workspace = true
near-plugins.workspace = true
omni-types.workspace = true

[dev-dependencies]
near-sdk = { workspace = true, features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions near/nep141-locker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ use storage::{TransferMessageStorage, TransferMessageStorageValue};
mod errors;
mod storage;

#[cfg(test)]
mod tests;

const LOG_METADATA_GAS: Gas = Gas::from_tgas(10);
const LOG_METADATA_CALLBACK_GAS: Gas = Gas::from_tgas(260);
const MPC_SIGNING_GAS: Gas = Gas::from_tgas(250);
Expand Down
Loading

0 comments on commit 537e93f

Please sign in to comment.