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

Mock ZAFClient for local dev and jest? #375

Open
TimOgilvy opened this issue Feb 14, 2022 · 3 comments
Open

Mock ZAFClient for local dev and jest? #375

TimOgilvy opened this issue Feb 14, 2022 · 3 comments

Comments

@TimOgilvy
Copy link

Hello!

I'm trying to use Jest and also use the local ZAT server to accelerate my development process, as the dev compiled version of my code is just too big to upload to Zendesk for testing.

I need to be able to mock my secure API calls in local dev, to streamline my development process, but can't find an easy way in webpack or jest to overwrite the one being by ZAT Server which is a bit of a mystery black-box from the user end.

I'm happy to have a dig around in the code and see if I can add something of value here... is this an enhancement or contribution y'all would be open to?

@TimOgilvy TimOgilvy changed the title Mock ZAFClient for local dev and jest Mock ZAFClient for local dev and jest? Feb 14, 2022
@TimOgilvy
Copy link
Author

TimOgilvy commented Feb 14, 2022

Just noticed the ZCLI tool, so had a look at that, does not seem to have any of the mature functionality of the ZAT setup. Not sure how to get help or where to contribute at this point.

@TimOgilvy
Copy link
Author

It looks like the scaffolds have been updated since I started using them to include Jest so that's a bonus:

https://github.com/zendesk/app_scaffold/blob/master/jest.config.js

Interesting to note that the ZAFClient global mocks init() but no other functionality.

@metasal1
Copy link

How good is ZCLI

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

2 participants