wen-community / wen-program-library

Apache License 2.0
90 stars 21 forks source link

More comprehensive test suite #60

Closed balmy-gazebo closed 6 months ago

balmy-gazebo commented 7 months ago

The current test suite is all javascript based and limited in edge cases. Should try to support a more broad range of test cases and ideally add a rust library.

kespinola commented 7 months ago

Thanks @balmy-gazebo happy you opened this one. I'm looking at the test suite right now and am curious on the direction and what people want out of their test suite.

  1. Overall what is the motivation behind the current spec setup vs leaning fully into the anchor test stack?
  2. What are folks thoughts on ideal?

For me its:

balmy-gazebo commented 7 months ago

The original test suite was built like this to also test the SDK. I’m very open to moving to anchor tests for this. Do you have a repository in mind that does this well?

kespinola commented 7 months ago

The original test suite was built like this to also test the SDK. I’m very open to moving to anchor tests for this. Do you have a repository in mind that does this well?

Doing research on that now.

Frens at nifty have a nice rust based setup using sdk generated by metaplex kinobi.

https://github.com/nifty-oss/asset/tree/main/clients/rust/asset

Then for vanilla anchor will mimic the examples in the anchor repo. They support some features like cloning accounts.

kespinola commented 6 months ago

https://github.com/wen-community/wen-new-standard/pull/74

New suite of tests have been written for both wns and royalty distribution including an example sales protocol for testing royalty enforcement.