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

Fix tests #103

Merged
merged 1 commit into from
Jan 14, 2020
Merged

Fix tests #103

merged 1 commit into from
Jan 14, 2020

Conversation

lhorie
Copy link
Contributor

@lhorie lhorie commented Jan 14, 2020

  • 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. This same exception occurs in a production system that consumes this package and that I maintain
  • 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
  • Also ran eslint --fix

- 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
@lhorie lhorie added the bugfix label Jan 14, 2020
@claassistantio
Copy link

claassistantio commented Jan 14, 2020

CLA assistant check
All committers have signed the CLA.

`${includePrefix}${definition.id.name}.${
enumDefinition.id.name
}`
`${includePrefix}${definition.id.name}.${enumDefinition.id.name}`
Copy link
Contributor Author

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
Copy link
Contributor Author

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);
Copy link
Contributor Author

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

Copy link

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});
Copy link
Contributor Author

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

@lhorie lhorie merged commit 541817f into uber-web:master Jan 14, 2020
@lhorie lhorie mentioned this pull request Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants