Basics
Use the template node as boilerplate
Create a mock runtime to test your pallet
use crate as pallet_testing; /*--snip--*/
Configure the mock runtime
/*--snip--*/ TestingPallet: pallet_testing::{Pallet, Call, Storage, Event<T>}, /*--snip--*/parameter_types! { pub const MaxValue: u32 = 50; } impl pallet_testing::Config for Test { type RuntimeEvent = RuntimeEvent; type MaxValue = MaxValue; }
Setup and create tests
Run your tests
Examples
Related material
Last updated