Open MaxStalker opened 1 year ago
My first choice testing library๐๐๐
Testing is important
We need this!
+1 on everything!! :)
I really look forward to having a stable flow testing JS framework. All are struggling with testing and most of them use JS. And current version has some issues when it comes to different versions of FCL, CLI (especially, the latest version)
What's more? We don't have enough materials / documents / articles / samples related to Cadence and Flow out there, thus, appreciate the idea about writing articles ๐
Can't wait !!!!
The more testing options the better.
If you canโt test it, I usually donโt bother to write it. This is a must have.
One last piece to complete the puzzle, is adding code coverage. A hint left from bluesign here: https://github.com/onflow/developer-grants/issues/113#issuecomment-1381793687, for another grant that is in review https://github.com/onflow/developer-grants/issues/132. It would be really awesome seeing the deliverable of one proposal, to empower another :pray:
Great idea, @m-Peter ! ๐ฏ
I think it could help a lot of people if it were made more robust, especially those who want to keep JS as their core tool for both their app and testing.
We use flow-js-testing at The Fabricant, and one of the most frustrating parts of development for me at the moment is testing. fjs in its current state is incredibly temperamental, hinders our development process and erodes some of the incredible DevEx that Flow has worked so hard on.
A well maintained, active testing library that is kept up to date with CLI/Cadence releases is essential to seamless development. As Bjarte said, a variety of testing options is important for developers. I believe that many people in the community would agree that the product of this grant proposal would be hugely beneficial! Thanks @MaxStalker for putting this together!
Can only second ๐ฏ what was said before, would love to see Max being able to continue maintaining the great testing library which is much needed! ๐
Jumping in here to support this proposal and Max's continued work maintaining Flow JS Testing library
Let's go! We will kickstart the process this week @MaxStalker. I'll reach out to you with details ๐
Thank you everyone for your support! ๐โโ๏ธ
Looking forward to it. @fotescodev !
Also voicing my support for @MaxStalker's proposal!
Max, I have some feedback that I'll put into some issues, but in general I think it'd be great if there was a way to access a lower-level API in flow-js-testing that makes it easier to use inside an existing testing library like Jest or Mocha.
Thank you for your support and feedback, @psiemens !
I was experimenting with custom environment for Jest, which would provide emulator on "invisible" layer with no extra setup needed from user.
Also been playing with Bun - https://bun.sh/ - to provide faster JS runtime and test executions.
Future looking bright for this framework ๐ฎ๐!
I would love to see Max taking care of the js testing!! Probably he's one, if not the one, who better knows how it works, and always have been kindly enough to answer any question I may have about it.
Awesome! Could we add either jsdoc annotations or typescript conversation as part of this as well?
@justinbarry I annotated all of the exposed functionality with jsdoc format - here's example of sendTransaction
function:
https://github.com/onflow/flow-js-testing/blob/master/src/interaction.js#L112
But it's not preserved during bundling and package building. Maybe I am just "cooking" it wrong - would appreciate any help on that front ๐โโ๏ธ
Typescript types are available here: https://www.npmjs.com/package/@types/onflow__flow-js-testing
Though should be part of the whole package - totally agree on that!
You got all my support Max! I need Flow JS Testing so I can make YT videos on how to test :D
Full support from here ๐ This would really help JS devs to start building on Flow ๐
Congratulations in getting the grant accepted @MaxStalker! Now let's get to work ๐
Congrats, @MaxStalker
Flow JS Testing
Grant category
Description
Flow JS Testing - https://github.com/onflow/flow-js-testing - is a set of utility functions, which allows developers to write tests using Javascript and Jest. You can easily deploy contracts, execute scripts, sign and send transactions.
I authored and brought this library to life and now I want to get it "back" and continue maintaining it ๐ค
Target audience
Evidence for the need
flow-js-testing
with multiple questions and challenges solved ๐คProposed solution
I will apply my accrued knowledge to provide support for this library and it's dependencies ๐
Impact
Javascript is still in Top-5 Programming languges used for web and blockchain development. Providing first-class support for Cadence testing with it will benefit those who will choose it and open possibilities for newcomers.
It's also much easier to teach someone how to test Cadence code if they are already using Javascript or Typescript to build their front-end part.
Milestones and funding
Team