starknet.go icon indicating copy to clipboard operation
starknet.go copied to clipboard

Improve tests

Open thiagodeev opened this issue 7 months ago • 5 comments

Topics:

  • #759
  • the mocks generated by gomock are mostly not being used
  • there are a lot of tests that doesn't have testnet/mainnet/devnet testcases
  • devnet should be more used, specially in the sending txns tests
  • move devnet utils to a centralized place (move from the account pkg)
  • follow the TableDrivenTests pattern in most tests where applicable https://go.dev/wiki/TableDrivenTests
  • CI: run test against other full-nodes besides Juno, like pathfinder...
  • add testnet tests for provider.Add***Txn endpoints

thiagodeev avatar Apr 25 '25 02:04 thiagodeev

gm, would love to contribute if the help is needed. Writing tests is my favourite part of development to be honest.

Let me know if you still need this to be done and I'll jump on it.

JJScar avatar Jul 08 '25 09:07 JJScar

Thanks for your willingness @JJScar! Your help will be appreciated. Which task do you plan to work on first?

thiagodeev avatar Jul 09 '25 17:07 thiagodeev

Excited to help such an important project! I'd love to start with follow the TableDrivenTests pattern in most tests where applicable https://go.dev/wiki/TableDrivenTests. Could you give me more info and context about it? I'll get started right away!

JJScar avatar Jul 10 '25 07:07 JJScar

@JJScar sure. Take this test as an example, it implements the TableDrivenTests pattern as explained here. I want you to look in the code for tests that are not implementing this pattern, and analyze if makes sense or not to implement it at the test.

thiagodeev avatar Jul 10 '25 19:07 thiagodeev

Got it. On it.

JJScar avatar Jul 11 '25 09:07 JJScar