-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Creating multiple app instances causes spec read to be empty #81
Comments
Thanks for the issue @charlocharlie. The reproducible project is much appreciated. will have a look |
I think i see the issue, should have a fix soon |
cdimascio
added a commit
that referenced
this issue
Oct 22, 2019
@charlocharlie, please give v2.8.1 a try. it should fix the issue described. thanks! |
Works for me now! I'm curious what the root issue is. Maybe a file lock issue with Anyway, thanks for the quick turnaround. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While writing unit tests for an express app, I kept seeing the error
version missing from OpenAPI specification
when creating multiple Express app instances within one Jest test file.After some debugging, it looks like the root cause is loadSpecFile not throwing an error when performing
require(absolutePath)
. This returns an object just containing__proto__
, which lets it past all the null checks until it hits the version missing error.How to reproduce
npm i
npm run test
version missing from OpenAPI specification
Just creating multiple app instances in
index.js
didn't seem to cause the bug. It may have something to do with how Jest sets up its tests. Usingjest --runInBand
to run the tests in series doesn't fix this.The text was updated successfully, but these errors were encountered: