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

Detect and write missing unit tests

Open ivpavici opened this issue 2 years ago • 4 comments

Detect any missing unit tests to improve testing coverage!

Just one example is the public async getEvents(eventFilter: RPC.EventFilter) method

ivpavici avatar Apr 17 '23 15:04 ivpavici

Unit Tests for CallData.compile

  • recompile compiled
  • RawCalldata to Calldata
  • compile arrays and objects
  • combining compiled data
  • compile than add to new RawArgs and recompile like {a:123, b:Calldata, ...}

Also unit test for rest of the CallData method where aplicable

tabaktoni avatar Apr 27 '23 21:04 tabaktoni

Missing: ~~getInvokeEstimateFee~~

ivpavici avatar Jul 03 '23 08:07 ivpavici

I'll take the test for getInvokeEstimateFee

chinesepowered avatar Aug 29 '23 05:08 chinesepowered

found 2 util method missing unit tests , I want add some unit test to improve testing coverage

sanitizeHex

image

splitLongString

image

momodaka avatar Dec 04 '23 02:12 momodaka

@ivpavici Can we close this generic Issue as we track by code coverage so we can have specific ones?

tabaktoni avatar Mar 28 '24 14:03 tabaktoni