Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% Test coverage #1263

Open
16 of 80 tasks
roninjin10 opened this issue Jul 3, 2024 · 2 comments
Open
16 of 80 tasks

100% Test coverage #1263

roninjin10 opened this issue Jul 3, 2024 · 2 comments
Assignees

Comments

@roninjin10
Copy link
Collaborator

roninjin10 commented Jul 3, 2024

Note: some of this missing coverage will be implicitly covered by upstream packages such as @tevm/memory-client which has extensive integration testing. We still want to get 100% unit test coverage nonetheless.

Core packages

@tevm/actions

  • src/Call/callHandler.js | 77.78 | 78.77 | 73-78,84-86,103-105,115-120,145-146,198-203,209-213
  • src/Call/callHandlerOpts.js | 66.67 | 52.11 | 30-36,38-46,51,54,63,66-85,87-91,93-94,99-119
  • src/Contract/contractHandler.js | 75.00 | 42.97 | 42-47,54-68,80-87,105-127,129-131,143-160
  • src/Contract/createScript.js | 80.00 | 57.60 | 21-24,30-42,46-48,59,105-136
  • src/Contract/validateContractParams.js | 16.67 | 30.00 | 28-30,32-33,35-36,38-41,43-46,48-51,53-54
  • src/CreateTransaction/createTransaction.js | 71.43 | 62.94 | 33-41,74,89,132-135,142-153,157-164,166-182
  • src/Deploy/deployHandler.js | 75.00 | 50.82 | 50-53,55,59-61,78-96,98-100
  • src/DumpState/dumpStateHandler.js | 100.00 | 55.56 | 36-43
  • src/GetAccount/getAccountHandler.js | 75.00 | 57.33 | 23-26,30-31,35,39-42,83-86,88-89,93,96-103,107,111-112,116-118
  • src/GetAccount/validateGetAccountParams.js | 50.00 | 72.73 | 21-22
  • src/LoadState/loadStateHandler.js | 100.00 | 69.57 | 39,45-47,51-53
  • src/LoadState/validateLoadStateParams.js | 50.00 | 61.54 | 35,37-38,40-41
  • src/Mine/emitEvents.js | 75.00 | 85.71 | 16
  • src/Mine/mineHandler.js | 100.00 | 86.75 | 21,86-92,110-112
  • src/SetAccount/setAccountHandler.js | 100.00 | 80.28 | 39-40,63,67-75,80
  • src/SetAccount/validateSetAccountParams.js | 28.57 | 71.88 | 29,38,40,43,45,48,50,53
  • src/eth/ethGetLogsHandler.js | 0.00 | 3.57 | 11-51,60-180
  • src/eth/gasPriceHandler.js | 75.00 | 40.00 | 22-34,36-37

@tevm/base-client

#1300

  • src/createBaseClient.js | 100.00 | 89.58 | 108,165-168,172-182,185-192,273,283
  • src/getBlockNumber.js | 0.00 | 21.43 | 7-17
  • src/statePersister.js | 0.00 | 11.11 | 9-32

@tevm/procedures

  • src/anvil/anvilDropTransactionProcedure.js | 50.00 | 14.29 | 9-26
  • src/anvil/anvilDumpStateProcedure.js | 50.00 | 27.27 | 11-18
  • src/anvil/anvilGetAutomineProcedure.js | 50.00 | 25.00 | 7-12
  • src/anvil/anvilImpersonateAccountProcedure.js | 50.00 | 13.64 | 9-27
  • src/anvil/anvilLoadStateProcedure.js | 50.00 | 6.98 | 9-48
  • src/anvil/anvilResetProcedure.js | 50.00 | 10.00 | 7-24
  • src/anvil/anvilSetBalanceProcedure.js | 50.00 | 10.71 | 9-33
  • src/anvil/anvilSetChainIdProcedure.js | 0.00 | 10.71 | 9-33
  • src/anvil/anvilSetCodeProcedure.js | 50.00 | 11.54 | 9-31
  • src/anvil/anvilSetCoinbaseProcedure.js | 50.00 | 10.53 | 10-43
  • src/anvil/anvilSetNonceProcedure.js | 50.00 | 10.71 | 9-33
  • src/anvil/anvilSetStorageAtProcedure.js | 50.00 | 9.68 | 9-36
  • src/anvil/anvilStopImpersonatingAccountProcedure.js | 50.00 | 22.22 | 7-13
  • src/call/callProcedure.js | 75.00 | 82.91 | 30-38,118-128
  • src/debug/debugTraceCallProcedure.js | 50.00 | 9.76 | 10-46
  • src/debug/debugTraceTransactionProcedure.js | 50.00 | 6.48 | 13-113
  • src/dumpstate/dumpStateProcedure.js | 75.00 | 67.50 | 31-43
  • src/eth/ethGetBlockByNumberProcedure.js | 100.00 | 61.82 | 22-42
  • src/eth/ethGetBlockTransactionCountByNumberProcedure.js | 100.00 | 65.52 | 15,19-27
  • src/eth/ethGetFilterLogsProcedure.js | 50.00 | 7.27 | 10-60
  • src/eth/ethGetLogsProcedure.js | 50.00 | 8.82 | 9-39
  • src/eth/ethGetTransactionByBlockHashAndIndexProcedure.js | 50.00 | 16.00 | 10-30
  • src/eth/ethGetTransactionByBlockNumberAndIndexProcedure.js | 50.00 | 9.52 | 10-47
  • src/eth/ethGetTransactionByHashProcedure.js | 50.00 | 8.06 | 11-67
  • src/eth/ethGetTransactionCountProcedure.js | 50.00 | 5.00 | 9-65
  • src/eth/ethGetTransactionReceiptProcedure.js | 50.00 | 5.08 | 8-63
  • src/eth/ethNewBlockFilterProcedure.js | 50.00 | 8.82 | 9-39
  • src/eth/ethNewFilterProcedure.js | 50.00 | 4.46 | 11-117
  • src/eth/ethNewPendingTransactionFilterProcedure.js | 50.00 | 9.09 | 9-38
  • src/eth/ethProtocolVersionProcedure.js | 50.00 | 40.00 | 9-14
  • src/eth/ethSendRawTransactionProcedure.js | 50.00 | 15.15 | 11-38
  • src/eth/ethSendTransactionProcedure.js | 50.00 | 21.05 | 10-24
  • src/eth/ethUninstallFilterProcedure.js | 100.00 | 86.21 | 25-28
  • src/loadstate/loadStateProcedure.js | 75.00 | 69.05 | 35-47
  • src/mine/mineProcedure.js | 75.00 | 70.45 | 17-29
  • src/requestBulkProcedure.js | 100.00 | 50.00 | 14-19,21-24
  • src/requestProcedure.js | 100.00 | 50.00 | 38-47
  • src/script/scriptProcedure.js | 50.00 | 3.36 | 11-125
  • src/utils/blockToJsonRpcBlock.js | 60.00 | 100.00 |

@tevm/state

  • src/actions/commit.js | 100.00 | 58.33 | 23,27,29-41 ✅ Test: MOre stateManager test coverage #1299
  • src/actions/generateCannonicalGenesis.js | 100.00 | 82.69 | 16-17,49-51,55-58
  • src/actions/getAccount.js | 60.00 | 35.29 | 17-38
  • src/actions/getAccountFromProvider.js | 0.00 | 22.22 | 11-24
  • src/actions/getContractCode.js | 100.00 | 43.18 | 29,31-33,35,37-38,41-43,45-48,50-54,56,58,60-63
  • src/actions/getForkBlockTag.js | 0.00 | 9.09 | 6-15
  • src/actions/getForkClient.js | 0.00 | 31.58 | 20-32
  • src/actions/putContractStorage.js | 0.00 | 21.05 | 8-11,21-31

@tevm/txpool

❌ 0% coverage (tested implicitly a lot with downstream packages)

@tevm/receipt-manager

❌ 0% coverage

@tevm/blockchain

❌ 0% coverage

@tevm/precompiles

@tevm/vm

#1284

  • src/actions/BlockBuilder.ts | 75.00 | 84.55 | 68-74,130,173-191,284-294
  • src/actions/deepCopy.js | 0.00 | 12.12 | 20-48
  • src/actions/errorMessage.js | 0.00 | 20.00 | 8-11
  • src/actions/generateTxResult.ts | 100.00 | 59.52 | 41,43-47,49-53,58-63
  • src/actions/runBlock.ts | 29.41 | 32.54 | 47-157,170-237,250-289,295,330-393,398-407,416-426,430-435,439-443,447-454,471,482-511,515-522,532-535
  • src/actions/runTx.ts | 100.00 | 57.14 | 48,52,60-63,71-72,86,105-110,121-128,134,139-144,150-151,153-162,178-181,185-187,190-202,206,208-216,222-227,240,242-245,252,261,293,301-303,312,322,347-348,350-354,360-373,375
  • src/actions/validateRunTx.js | 100.00 | 70.37 | 22-24,35-36,49,51-52,57-58,64-66,69-71

Completed

@tevm/jsonrpc

@tevm/common

@tevm/server

@tevm/predeploys

✅ 100%

@tevm/tx

✅ 100%

@tevm/block

✅ 100%

@tevm/contract

@tevm/evm

✅ 100%

@tevm/memory-client

✅ 100%

@tevm/decorators

✅ 100%

@tevm/rlp

✅ 100%

@tevm/trie

✅ 100%

@tevm/ethers

✅ 100%

@roninjin10
Copy link
Collaborator Author

Package.  | % Stmts | % Branch | % Funcs | % Lines |
  • @tevm/actions | 75.92 | 81.71 | 79.16 | 75.92
  • @tevm/address | 98.57 | 96.29 | 100 | 98.57
  • @tevm/base-client | 92.71 | 87.28 | 76.47 | 92.71
  • @tevm/blockchain | 94.65 | 87.9 | 95.83 | 94.65
  • @tevm/common | 99.14 | 81.25 | 100 | 99.14 |
  • @tevm/contract | 100 | 100 | 100 | 100 |
  • @tevm/evm | 100 | 100 | 100 | 100
  • @tevm/jsonrpc | 100 | 66.66 | 100 | 100 |
  • @tevm/logger | 100 | 100 | 100 | 100 |
  • @tevm/memory-client | 99.88 | 97.43 | 100 | 99.88 |
  • @tevm/precompiles | 100 | 100 | 100 | 100 |
  • @tevm/predeploys | 100 | 100 | 100 | 100 |
  • @tevm/procedures | 55.3 | 73.91 | 98.46 | 55.3 |
  • @tevm/receipt-manager | 84.61 | 100 | 33.33 | 84.61 |
  • @tevm/server | 96.74 | 91.11 | 83.33 | 96.74 |
  • @tevm/state | 69.48 | 83.42 | 78.84 | 69.48 |
  • @tevm/sync-storage-persister | 80.58 | 52.94 | 75 | 80.58 |
  • @tevm/trie | 100 | 100 | 100 | 100 |
  • @tevm/tx | 98.71 | 95.23 | 100 | 98.71 |
  • @tevm/tx-pool | 0 | 0 | 0 | 0 |
  • @tevm/utils | 81.1 | 94.44 | 88.88 | 81.1 |
  • @Tevm/vm Still using bun test

@roninjin10
Copy link
Collaborator Author

Package  |          % Lines |
  • @tevm/actions | 75.92
  • @tevm/address | 98.57
  • @tevm/base-client | 92.71
  • @tevm/blockchain | 94.65
  • @tevm/common | 99.14 |
  • @tevm/contract | 100 |
  • @tevm/evm |100
  • @tevm/jsonrpc | 100 |
  • @tevm/logger | 100 |
  • @tevm/memory-client | 99.88 |
  • @tevm/precompiles | 100 |
  • @tevm/predeploys | 100 |
  • @tevm/procedures | 55.3 |
  • @tevm/receipt-manager | 84.61 |
  • @tevm/server | 96.74 |
  • @tevm/state | 69.48 |
  • @tevm/sync-storage-persister | 80.58 |
  • @tevm/trie | 100 |
  • @tevm/tx | 98.71 |
  • @tevm/tx-pool | 0 |
  • @tevm/utils | 81.1 |
  • @Tevm/vm Still using bun test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant