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 support / documentation #275

Open
xFeXx opened this issue Apr 26, 2024 · 0 comments
Open

Test support / documentation #275

xFeXx opened this issue Apr 26, 2024 · 0 comments

Comments

@xFeXx
Copy link

xFeXx commented Apr 26, 2024

Hey there,
thank you for this neat cropper component!
It works really well with vue3 + nuxt3.

Sadly I can't really see any tests and no guide on how to test components using this component.
For example the whole methods section is really hard to test without any explanations.
https://advanced-cropper.github.io/vue-advanced-cropper/components/cropper.html#methods

I use vitest and atm I got some things testes with spys:

const rotateSpy = vi.spyOn(cropper.vm, 'rotate').mockImplementationOnce(() => vi.fn())

This is not sufficiant for more complex use cases like the things you do in your examples.
Especially the getResult() method I can't get to be correctly mocked.

Are there any plans on adding test examples oder some sort of explanation to the project?

Thanks in advance!

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

No branches or pull requests

1 participant