-
Notifications
You must be signed in to change notification settings - Fork 261
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
Not working after upgrade to 1.1.6 in integration testing with mocha and supertest #187
Comments
some tests fails with the error above, but others with this one:
|
Probably it's something related to file uploads as "Buffer". |
I'm encountering the same error. When in debug mode on a local machine, everything works fine. When running the application as production inside a Docker container, I get this exact error message. I have been using the latest version, will try downgrading to 1.1.5 now. Update: On 1.1.5 everything is working as expected. This definitely is a bug in the newest version. |
Hi @Ks89 , From trace you shared it looks that you send empty file name. |
I have two ideas regarding to this issue:
|
Yes, probably it's because I didn't set the name, but the problem is that I don't know how to set the name in case of integration testing with supertest. Filename is something in the header of the request? |
yes, filename is embedded in opening bytes of the file, typically referred to as the file header.
On Jan 6, 2020 3:53 PM, Stefano Cappa <[email protected]> wrote:
Yes, probably it's because I didn't set the name, but the problem is that I don't know how to set the name in case of integration testing with supertest. Filename is something in the header of the request?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#187?email_source=notifications&email_token=ABCGR7LWK46T2E4HYUTCCKTQ4OR55A5CNFSM4KCAC47KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIG5HSI#issuecomment-571331529>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABCGR7N7IQHDFOCX7EISYRDQ4OR55ANCNFSM4KCAC47A>.
|
Do you have any suggestion about the name of this header to set it manually into supertest? |
PR #207 fixes this issue. |
I'm having a weird issue after upgrading from 1.1.5 to 1.1.6.
I can't share the code, because it's closed and copyrighted but I'll try to explain a little bit the situation.
I'm having this issue while running tests with mocha and supertest.
This is my env:
macOS Catalina 10.15.2
iTerm2 with zsh as terminal
nodejs 12.14.0 and npm 6.13.4
All node modules are updated to the latest versions.
If I run npm test with version 1.1.5 everything is ok, but with 1.1.6 I receive this error:
I defined express-fileupload in my app.js as express middleware, as alway.
Also, in my tests I'm using this code to upload files:
I'm sure that is something related to your package, because if I force version
"=1.1.5"
in my package.json everything works as expected, but not with version 1.1.6.The text was updated successfully, but these errors were encountered: