-
Notifications
You must be signed in to change notification settings - Fork 117
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
Fix tests. #106
Conversation
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.
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 ./", |
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.
-p ./
is implied when there is a tsconfig.json
at project root, so why are you doing this?
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.
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'", |
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.
What was wrong with --project tsconfig.json
? The way I had it, you don't have to duplicate the include paths.
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.
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", |
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.
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.
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.
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) => { |
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.
Where is resolve
being called? I'm not seeing 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.
Thanks a ton! These tests have been a bit of a PITA. |
Additionally, I made the following changes:
package.json
.vscode
for testing doesn't need to be downloaded every time a compilation is triggered.test
messages as a test message is displays when test fails.os.EOL
so tests can be run correctly also onWindows
.