Skip to content

Speed up fourslash tests #10211

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

Merged
merged 4 commits into from
Aug 12, 2016

Conversation

RyanCavanaugh
Copy link
Member

This makes two time/correctness tradeoffs that I think are worthwhile. Each saves approximately the same amount of time; on my machine the fourslash suite went from 1m55s to 1m05s

  • Use ts.transpile instead of a full compiler setup to compile the fourslash test code into JS. This means we won't see errors per se in the originating fourslash test, but people should be editing these in an editor that provides error highlighting anyway
  • Turn off the "high fidelity" typing behavior by default. High fidelity input was never intended to be used everywhere and it invokes a ton of LS calls that are irrelevant and haven't really found any bugs.

@DanielRosenwasser
Copy link
Member

Use ts.transpile instead of a full compiler setup to compile the fourslash test code into JS. This means we won't see errors per se in the originating fourslash test, but people should be editing these in an editor that provides error highlighting anyway

This means that if you ever change something in goTo or edit in some way, you'll never know about it because you don't have all of your tests open in your editor. 😕

@RyanCavanaugh
Copy link
Member Author

This means that if you ever change something in goTo or edit in some way,

It's hard to imagine we'd do that?


ts.Debug.assert(!!result);
runCode(result, state);
runCode(ts.transpile(content), state);
Copy link
Member

Choose a reason for hiding this comment

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

We should use transpileModule (seeing as we claim that transpile is pretty much deprecated on the wiki) and reportDiagnostics: true. Just so we report parse errors, since they're going to get hit anyway.

@RyanCavanaugh RyanCavanaugh merged commit ec49525 into microsoft:master Aug 12, 2016
@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