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. #106

Merged
merged 2 commits into from
Mar 5, 2017
Merged

Fix tests. #106

merged 2 commits into from
Mar 5, 2017

Conversation

JimiC
Copy link

@JimiC JimiC commented Mar 5, 2017

Additionally, I made the following changes:

  • Corrected the scripts in package.json.
  • vscode for testing doesn't need to be downloaded every time a compilation is triggered.
  • Corrected the test messages as a test message is displays when test fails.
  • Added os.EOL so tests can be run correctly also on Windows.

Copy link
Member

@jednano jednano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! Thanks for figuring all this out. Just a couple comments.

package.json Outdated
"compile": "tsc",
"lint": "tslint --project tsconfig.json",
"postinstall": "node ./node_modules/vscode/bin/install",
"compile": "tsc -p ./",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-p ./ is implied when there is a tsconfig.json at project root, so why are you doing this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be more obvious but I can drop it.

package.json Outdated
"lint": "tslint --project tsconfig.json",
"postinstall": "node ./node_modules/vscode/bin/install",
"compile": "tsc -p ./",
"lint": "tslint 'src/**/*.ts' 'test/**/*.ts'",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was wrong with --project tsconfig.json? The way I had it, you don't have to duplicate the include paths.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't seen this be used in any other project, I can revert it.

package.json Outdated
"precompile": "node ./node_modules/vscode/bin/install",
"compile": "tsc",
"lint": "tslint --project tsconfig.json",
"postinstall": "node ./node_modules/vscode/bin/install",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had issues w/ other projects if they were a dependency of another project, this would fail upon install, but considering this is an extension and shouldn't be a dependency of another project, I'll accept this.

Copy link
Author

@JimiC JimiC Mar 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come to think of it the only time vscode-test needs to be redownloaded is when there is a new version of vscode released. Considering though that vscode-test is needed only when on local or CI testing, I think it's safe.
(CI will always download a fresh copy as it executes npm install every time).

'applies edit'
);
return await new Promise(resolve => {
return await new Promise<string>(async (resolve) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is resolve being called? I'm not seeing it.

Copy link
Author

@JimiC JimiC Mar 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jednano jednano merged commit e30ab0b into editorconfig:master Mar 5, 2017
@jednano
Copy link
Member

jednano commented Mar 5, 2017

Thanks a ton! These tests have been a bit of a PITA.

@JimiC JimiC deleted the tests_fix branch March 5, 2017 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants