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

Added small unit test #234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jopech-tibco
Copy link

@jopech-tibco jopech-tibco commented Oct 8, 2024

Added small unit test for checking that selection is working. This is a POC, but could be really helpful to have UT in place @simonwep

I used @testing-library/dom for simulating mousedown/mousemove/mouseup

How to run?

npx lerna run test --scope @viselect/vanilla

Deps added:

  • vitest
  • playwright
  • @testing-library/dom
Screenshot 2024-10-08 at 2 25 43 p m

@simonwep
Copy link
Owner

Hey @jopech-tibco, that is really cool! Yeah this library is quite "old" and could go with some unit tests, I'll definitely have a look at it the coming days ❤️ Hell, playwright and vitest didn't even exist when I first created it 😅

@jopech-tibco
Copy link
Author

Could be quite old, but its really cool and useful

@simonwep simonwep added the improvement Something could be changed label Oct 13, 2024
@simonwep
Copy link
Owner

Alright, I'm gonna keep this PR open for a while until I added a GitHub workflow and maybe a few more tests. I really like this Idea but don't have that much time at hand right now, but thank you for bringing this up. Been using vitest and playwright for years at work but kinda forgot about the projects of my own haha :D

I should probably set up something like prettier as well and migrate ESLint to v9 ugh...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something could be changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants