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

Dev test #121

Merged
merged 90 commits into from
May 14, 2024
Merged

Dev test #121

merged 90 commits into from
May 14, 2024

Conversation

djmbritt
Copy link
Member

@djmbritt djmbritt commented May 13, 2024

Latest update for the bootstrapping of the testing framework for effectai/sdk.
We don't have complete coverage yet, but we're pretty far.
See table below for test coverage.

The docs have been updated as well, it is not an exhaustive list of all the functions in the SDK, only the functions that we're identified to be of most value to other developers working with the SDK.
See list below for list of SDK documentation, and or pull this branch, build and serve the branch locally: bun run docs:dev

Finally, while developing the testing framework and writing the docs, I identified several functions where the function signatures were not thematically in line with other function signatures. So some functions parameters types have been changed to make the SDK interface more coherent.

SDK API

vAccount
[claim]
[createAccount]
[deposit]
[getVAccounts]
[getPendingPayments]
[payout]
[withdraw]
Token
[getPrice]
[getBalance]
[transfer]
[swap]
Tasks
[createCampaign]
[getCampaigns]
[getCampaignById]
DAO
[getAccountAssets]
Glossary
[Client Options]
[TransactResult]
[Asset]

Test Coverage

File % Funcs % Lines Uncovered Line #s
All files 63.34 63.19
src/actions/atomic/getAccountAssets.ts 0.00 6.67 24-37
src/actions/atomic/getAsset.ts 0.00 9.26 10-25,36-68
src/actions/atomic/getCollection.ts 0.00 6.67 11-24
src/actions/atomic/getSchema.ts 0.00 5.00 10-28
src/actions/dao/getDaoSettings.ts 0.00 14.29 8-19
src/actions/dao/setAvatar.ts 0.00 10.00 11-37
src/actions/ipfs/getIpfsResource.ts 100.00 75.93 54-64,70
src/actions/ipfs/uploadIpfsResource.ts 0.00 6.82 9-43,48-53
src/actions/session/createSession.ts 0.00 20.00 13-28
src/actions/session/setSession.ts 0.00 50.00
src/actions/tasks/batch/createBatch.ts 0.00 7.69 19-48,58-78,90-170
src/actions/tasks/batch/getBatch.ts 100.00 100.00
src/actions/tasks/campaigns/createCampaign.ts 66.67 19.64 14-34,53,55-56,58,60,62-77,79-81
src/actions/tasks/campaigns/getAllCampaigns.ts 100.00 100.00
src/actions/tasks/campaigns/getCampaignById.ts 100.00 100.00
src/actions/tasks/campaigns/getCampaigns.ts 100.00 100.00
src/actions/tasks/getAccTaskIdx.ts 100.00 92.31 37-38
src/actions/tasks/getForceSettings.ts 100.00 85.71 22-23
src/actions/tasks/getRepetitions.ts 100.00 85.71 20-21
src/actions/tasks/getSubmissions.ts 100.00 89.47 30-31
src/actions/tasks/getTask.ts 66.67 53.85 30-32,37-41,45-46,51-58
src/actions/tasks/reservations/getReservations.ts 85.71 67.19 49-50,73-74,86-102
src/actions/tasks/reservations/reserveTask.ts 0.00 5.45 11-62
src/actions/tasks/submitTask.ts 0.00 12.82 14-47
src/actions/token/getBalance.ts 100.00 100.00
src/actions/token/getDefiBoxPair.ts 100.00 92.00 27-28
src/actions/token/getPrice.ts 100.00 90.00
src/actions/token/swap.ts 100.00 57.75 26,31,33,35,37-60,92-93
src/actions/vaccount/claim.ts 0.00 9.80 12-39,49-66
src/actions/vaccount/createAccount.ts 100.00 32.35 21,24,26-27,29-34,36-48
src/actions/vaccount/deposit.ts 0.00 11.36 12-37,47-59
src/actions/vaccount/getAccounts.ts 100.00 100.00
src/actions/vaccount/getAvatar.ts 0.00 11.11 8-23
src/actions/vaccount/getOrCreate.ts 100.00 75.00 23,25,29-30
src/actions/vaccount/getPendingPayments.ts 25.00 78.26 8-11,16,19-22
src/actions/vaccount/payout.ts 100.00 40.00 17,30,32,34-43,47-59
src/actions/vaccount/transfer.ts 100.00 96.00 22
src/actions/vaccount/withdraw.ts 0.00 7.32 15-35,48-64
src/cache.ts 46.15 69.77 10,26-31,36-37,41,46-47
src/client.ts 100.00 100.00
src/constants/config.ts 100.00 100.00
src/constants/network.ts 100.00 100.00
src/errors.ts 33.33 55.56 6-9,15-18
src/exports/constants.ts 100.00 100.00
src/exports/errors.ts 100.00 100.00
src/exports/index.ts 100.00 100.00
src/exports/template.ts 100.00 100.00
src/exports/version.ts 100.00 100.00
src/session.ts 100.00 100.00
src/template/template.ts 0.00 20.00 12-15,19-25,29-35,39-57,61-64,69-70,74-75,79-80
src/template/templateScript.ts 100.00 100.00
src/utils/keys.ts 100.00 95.65
src/utils/state.ts 100.00 100.00
src/utils/structs.ts 0.00 83.33
src/utils/transaction.ts 50.00 20.00 12-43
src/utils/variants.ts 100.00 100.00
test/src/constants.ts 100.00 100.00
test/src/utils.ts 100.00 95.24
--------------------------------------------------- --------- --------- -------------------

37 pass
5 skip
16 todo
0 fail
62 expect() calls
Ran 58 tests across 31 files. [16.01s]

@Jeffrieh Jeffrieh merged commit f6f20e5 into dev May 14, 2024
@djmbritt djmbritt deleted the dev_test branch May 15, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants