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

New feature to test file upload #87

Open
baconYao opened this issue Mar 6, 2019 · 3 comments
Open

New feature to test file upload #87

baconYao opened this issue Mar 6, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@baconYao
Copy link

baconYao commented Mar 6, 2019

This is an amazing project! Thanks for your effort.
Do you have plan to develop new feature about uploading file?

@estrada9166
Copy link
Member

Thanks for creating this issue!

It sounds something nice to have, I was thinking to add first a new method that can be used to test the whole resolver, maybe it can be useful to test the file uploading, what do you think?

@estrada9166 estrada9166 added the enhancement New feature or request label Mar 6, 2019
@baconYao
Copy link
Author

I'm a bit confused about the method you said. But I am very much looking forward to it.
Would you mind sharing your thoughts? Maybe we can discuss together.

@estrada9166
Copy link
Member

estrada9166 commented Mar 12, 2019

Sure! What I'm thinking is using tester.graphql() and it will execute the mutation with the resolver... so, in case you're uploading a file, you can use sinon stub to stub the upload and return a custom value; that way you can test the whole resolver :)

Also, if you want to share how you are doing it, we can see how we can create a test case to it!

You can use this codesandbox so we can test it there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants