Skip to content

Add tests for tsserver project system - #9002

Merged
Zhengbo Li (zhengbli) merged 3 commits into
microsoft:masterfrom
zhengbli:moreTsserverTests
Jun 8, 2016
Merged

Zhengbo Li (zhengbli) merged 3 commits into
microsoft:masterfrom
zhengbli:moreTsserverTests

Conversation

@zhengbli

@zhengbli Zhengbo Li (zhengbli) commented Jun 7, 2016 •

Copy link
Copy Markdown

No description provided.

const callbacks = lookUp(this.watchedFiles, path);
if (callbacks) {
for (const callback of callbacks) {
callback(path, /*removed*/ true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we ever use removed parameter? As I can see we already double check the presence of file in event handler so we should either remove it if we think it should not be trusted or switch to using it (and in this case it should become parameter in triggerFileWatcherCallback)?

@zhengbli Zhengbo Li (zhengbli) Jun 7, 2016 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I didn't see it was used anywhere in the server code. However, it may be used in other hosts like chakra, as the implementation of event handler is host specific. Might be safer to move it as a parameter in triggerFileWatcherCallback.

@vladima

Copy link
Copy Markdown
Contributor

can we add tests for cases when files were initially in configured project but then were moved to inferred project after config file is changed.

  • file was explicitly excluded in config file
  • module resolution related settings were changed so opened file that used to be the part of configured project is now become a standalone open file

@zhengbli

Copy link
Copy Markdown
Author

Vladimir Matveev (@vladima) further comments?

@vladima

Copy link
Copy Markdown
Contributor

👍

@zhengbli
Zhengbo Li (zhengbli) merged commit cdf4cde into microsoft:master Jun 8, 2016
@zhengbli
Zhengbo Li (zhengbli) deleted the moreTsserverTests branch June 8, 2016 04:56
@mhegazy

Copy link
Copy Markdown
Contributor

thanks!

@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants