CosmWasm / cw-multi-test

CosmWasm multi-contract testing framework
Apache License 2.0
48 stars 42 forks source link

Addons #98

Closed DariuszDepta closed 12 months ago

DariuszDepta commented 1 year ago

Prepared module named addons, where additional components or extensions to MultiTest will be placed. Add-ons are not required (or crucial) to use MultiTest in common testing scenarios, but provide additional functionalities, that may be used while testing CosmWasm smart contracts.

Add-ons provided in this PR:

Please consult the source code documentation to learn more about these add-ons.

Using provided add-ons, writing tests with Bech32 addresses is now simpler, e.g.:

    // prepare the application with Bech32 Api and mock address generator
    let mut app = AppBuilder::default()
        .with_api(MockApiBech32::new("juno"))
        .with_wasm(WasmKeeper::default().with_address_generator(MockAddressGenerator))
        .build(|_, _, _| {});

    // test your contract
    // ...
DariuszDepta commented 1 year ago

@webmaster128 This is the proposal of a concept of providing add-ons instead separate crates. Provided add-ons in this PR meet the needs reported e.g. here: #95, without copying and pasting the same code by test creators.