You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute from outside is already tested in test_execute_from_outside.cairo
Some tests are already implemented in test_contract_account.cairo
Add tests for other entrypoints, using starknet-foudry.
Modify existing tests, avoiding contract deployment if possible. For example, to test the get_nonce / set_nonce entrypoints, I can use a combination of store / load and internal state of the contract; which is easier than deploying everything.
Avoid deploying contracts if possible: for simple use cases, you should be able to use a combination of store, load, and internal testing using contract_state_for_testing.
Execute from outside is already tested in
test_execute_from_outside.cairo
Some tests are already implemented in
test_contract_account.cairo
Add tests for other entrypoints, using starknet-foudry.
Modify existing tests, avoiding contract deployment if possible. For example, to test the
get_nonce
/set_nonce
entrypoints, I can use a combination ofstore
/load
and internal state of the contract; which is easier than deploying everything.Avoid deploying contracts if possible: for simple use cases, you should be able to use a combination of
store
,load
, and internal testing usingcontract_state_for_testing
.see https://book.cairo-lang.org/ch17-02-testing-smart-contracts.html#accessing-internal-functions-with-contract_state_for_testing
The text was updated successfully, but these errors were encountered: