-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix tests #103
Fix tests #103
Conversation
- I found that yarn.lock was declared in .gitignore, meaning that the installation for this package's dependencies is currently not deterministic - I assume yarn is the intended package manager, considering that there are scripts in package.json that explicitly call out to it - I found that generating yarn.lock from a fresh checkout brings the project into a state where tests fail - I fixed the root cause of the failure (using relative path in some places, but using absolute paths in others) - I also increased jest timeout for some tests that were timing out for whatever reason
`${includePrefix}${definition.id.name}.${ | ||
enumDefinition.id.name | ||
}` | ||
`${includePrefix}${definition.id.name}.${enumDefinition.id.name}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is the output of eslint --fix
@@ -8,4 +8,3 @@ | |||
.tmp | |||
|
|||
yarn-error.log | |||
yarn.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming yarn since a script in package.json calls out to it
@@ -27,6 +27,8 @@ | |||
import fs from 'fs'; | |||
import {flowResultTest} from '../../test-util'; | |||
|
|||
jest.setTimeout(10000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't know why some tests timeout, increasing value solves it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we at least add a TODO or additional task to investigate why this is needed?
@@ -98,7 +98,7 @@ export class ThriftFileConverter { | |||
|
|||
constructor(thriftPath: string, withsource: boolean) { | |||
this.thriftPath = path.resolve(thriftPath); | |||
this.thrift = thrift({...thriftOptions, entryPoint: thriftPath}); | |||
this.thrift = thrift({...thriftOptions, entryPoint: this.thriftPath}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a test failure due to .definitions is undefined
NPE
eslint --fix