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

[TEST] Create unit tests of useScaffoldStarkProfile.ts #379

Open
metalboyrick opened this issue Dec 12, 2024 · 31 comments
Open

[TEST] Create unit tests of useScaffoldStarkProfile.ts #379

metalboyrick opened this issue Dec 12, 2024 · 31 comments

Comments

@metalboyrick
Copy link
Collaborator

Issue Overview

Unit tests required for the indicated file to ease future refactoring and feature validations.

Proposed Solutions or Ideas (more like tips and reminders)

  • We use vitest to run the unit tests, can refer to their documentation for the syntax: https://vitest.dev/, Jest developers shouldn't have too much of a hard time getting used to the syntax.
  • Note that hooks testing tools are also now imported via @testing-library/react,
  • Please refer to README.md on how to execute the tests
  • Use it.only() to isolate tests in case you need to, but do not forget to remove it once you are submitting your PR.
  • Mock when necessary. please make sure that the tests NOT ONLY works on your device
  • If you're not sure of the features of the code unit to test, please refer to the documentation, or free to ask on this issue page or on the Telegram Group

Code Coverage

IMPORTANT - When submitting a PR, please provide a screenshot of the coverage for the specific units you are working on. We would like to achieve >= 70 % code coverage.

Happy Hacking!

Example:
image

@raizo07
Copy link
Contributor

raizo07 commented Dec 12, 2024

@metalboyrick can I work on this?

@fabrobles92
Copy link

Hello Fab here,

I work as a Full Stack using Python and JavaScript frameworks such as React and Vue where I have created unit and integrations tests with its corresponding mocks using Jest in my day to day work. I usually structure the unit tests using AAA approach (Arrange, Act, Assert).

With that in mind I think this can be easily tackled and I would love to contribute for the first time to this project :)

@martinvibes
Copy link
Contributor

i'm a frontend dev and blockchain dev
May I try my hand at this?
i would love to work on this and get it done

@Supa-mega
Copy link

I'd be happy to do this.

@jedstroke
Copy link

Can I work on this, please?

@od-hunter
Copy link

Hi, please can I be assigned this please? I would love to be the given the opportunity to solve this issue please. I am good with tests and I have experience in html, css, JavaScript,TypeScript and solidity, and Cairo
I have gone through the proposed solution and I’ll say I’m up for the task, I’ll make sure to keep you updated at all times and ask any questions if I have.

Kindly assign me please.

@CollinsC1O
Copy link
Contributor

Hello @metalboyrick May I take this issue on?

@No-bodyq
Copy link

May I take this issue on?

@abdegenius
Copy link
Contributor

Would love to tackle this!

@1nonlypiece
Copy link

Hi,
I’d like to work on this issue as I have experience with Cairo and building on StarkNet, including writing and optimizing smart contracts.

ETA:
I estimate completing this task in about 12-24 hours. Let me know if I can get started!

@aniruddhaaps
Copy link

To address the problem, I would

Use Vitest for unit tests and refer to the documentation of Vitest for syntax.

Then import hooks testing utilities from @testing-library/react along with mock dependencies.

Clear, portable tests: Validate across devices. Ensure it.only() is removed before submission of the PR.

@gadyrcdz
Copy link

Let me handle this issue! I want to learn more about these issues and this one gonna help me a lot. Also, I'm a member of the community Dojo Coding.

@Jagadeeshftw
Copy link

Hi,
I’d love to work on this issue as I have strong experience in developing secure and efficient smart contracts using Cairo and deploying them on StarkNet. Please assign this to me, and I’ll ensure to deliver a robust and high-quality PR within 12-24 hours.

@ncoquelet
Copy link

Hey,

I'm a dev with 20 years of XP, super comfy with TypeScript, React/Next, Dapps, Prisma, CI/CD. I ship fast and high-quality stuff. Worked with AFK and GoStarkMe, check my GitHub profile for more details (got several hackathon prizes).
Currently doing Basecamp 11.

Down to handle this task.

@Benjtalkshow
Copy link

I am a Full Stack Developer with a strong background in blockchain and extensive experience in Next.js/React, TypeScript, and Rust. I’ve made over 49 contributions to over 17 projects in the OnlyDust ecosystem, solving complex issues and delivering efficient, scalable solutions.

I can handle this task.
ETA is 3days.

@Yunusabdul38
Copy link

May I be assigned to this?
will be glad to work on this as my first contribution to this project
I have solid experience with contract integration and have worked on multiple web3 projects (open source and personal projects)

@ONEONUORA
Copy link

I’m interested in this one. I am a full stack and blockchain developer. ETA 24 hours

@kayceeDev
Copy link

May I take care of this?

@lauchaves
Copy link

Hey! I'm Lau Chaves, I would like to contribute to this issue!

I have over 5 years of experience with JavaScript, ReactJS,React Native TypeScript, and Ruby. I’m now enthusiastic about web3 and eager to learn more! I’m also a member of Dojo Coding Costa Rica.

Id follow the instructions mentioned above to do the tests :)

@psychemist
Copy link

Hi. I am a fullstack web developer and a recent alumni of Web3Bridge, the largest and most sought after blockchain developer community in Africa. I have extensive experience testing backend systems and smart contracts using Jest, Mocha, Chai, and Forge. I am a new contributor to OnlyDust and would love to take on this task to increase my knowledge base and contribute to open source projects.

i would test the useScaffoldStarkProfile.ts component by:

  • Studying the code to map out its core functions and dependencies and identify relevant test conditions and edge cases
  • Writing Vitest scripts to test the hook's logic, making sure to cover all functions
  • Mocking the hook's behaviour where necessary to achieve 70% code coverage at minimum
  • Ensure that the tests work across all platforms and not just on my local machine
  • Include a screenshot alongside my PR submission

I aim to complete this task within 2 days of being assigned and setting up my development environment.

Thank you for the opportunity and I look forward to working with you.

@cidkagenow
Copy link

I’d like to work on this.

@Kaminar-i
Copy link

Could I take a shot at this?

@ShantelPeters
Copy link

May I take care of this?

@Amarjeet325
Copy link

Can I take care of this issue?

@ryzen-xp
Copy link

Hi, I'm a proficient blockchain developer with expertise in Cairo, Rust, Solidity, Vitest, and web development. I'll create unit tests for useScaffoldStarkProfile.ts using Vitest, ensuring >= 70% code coverage. I'll handle necessary mocking and will provide a screenshot of the coverage in the PR.

Please assign this to me. Thank you!

@vestor-dev
Copy link

hey sir i would love to work on this issue
i'm a blockchain dev and i would love to handle this issue
assign me and i'll get to work

@TheSQLguy
Copy link

To address the problem, I would

Use Vitest for unit tests and refer to the documentation of Vitest for syntax.

Then import hooks testing utilities from @testing-library/react along with mock dependencies.

Clear, portable tests: Validate across devices. Ensure it.only() is removed before submission of the PR.

@NueloSE
Copy link
Contributor

NueloSE commented Dec 12, 2024

am a software developer with experience in create web applications and writing test to ensure proper functionality of these applications.
I have handled similar issue in past odhack

check the link to similar task

@BrunoAmbricca
Copy link

I would like to work on this issue

@lauchaves
Copy link

Thanks will open a PR soon 🚀

@Nadai2010
Copy link
Collaborator

Thank you all very much for participating, @lauchaves good luck, if you have any questions you can tag us.

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