Near-One / near-plugins

Implementation of common patterns used for NEAR smart contracts.
Creative Commons Zero v1.0 Universal
27 stars 12 forks source link

test: add integration tests for `Pausable` plugins #51

Closed mooori closed 1 year ago

mooori commented 1 year ago

Previously Pausable was tested by unit tests via near_sdk::testing_env, which mocks the chain.

The new integration tests compile the contract in near-plugins/tests/contracts/pausable, deploy it on chain via near workspaces and send transactions to it.

This is a step towards having only one contract for the Pausable plugin which is used for tests and serves as documentation resp. example, as laid out in #48. In a follow up PR I’ll clean up duplicate example contracts.

Other changes: refactor near-plugins/tests/common

mooori commented 1 year ago

CI is green and I've double checked that there are no more open TODOs related to this PR, so merging now.