-
Notifications
You must be signed in to change notification settings - Fork 2
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
Using reqresnext to test a file upload #32
Comments
Sorry, no ideas right now (( |
I think we can take an API contract from https://www.npmjs.com/package/express-fileupload to synthesize new Request({
files:
foo: {
name: 'foo',
mimeType: 'foo',
data: <path/buffer>,
md5: ...
},
bar: {...}
}) ↓
|
Hey @antongolub just wanted to say thank you for all your speedy responses to our issues and PRs :) We've written a test framework for testing express routes in Ghost that doesn't use http, instead it uses this module as its heart. It's really similar to supertest, but no http = faster :D It lives here: https://github.com/TryGhost/framework/tree/main/packages/express-test and is totally agnostic, all the Ghost-specific code is in a wrapper in the Ghost repo. It doesn't support file uploads yet as I've not had chance to look again since you replied, however I will at some point want to add that feature. Really grateful for your help, the commit bit & for this module ❤️ |
Wow! Thank a lot for the feedback. I apreciate, that's truly motivating. |
I'm trying to figure out how to test a file upload endpoint using reqresnext :grim: Any idea if it's even possible?
I think it might depend on too many internals of http 🤔
The text was updated successfully, but these errors were encountered: