-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Speed up TypeScript compilation when running test suite #416
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
Conversation
Speed up the test suite by updating to the current version of the TypeScript compiler which is ~5x faster than the 1.0 version that was being used previously and caching compiled TypeScript files. * Update type definitions and flatten.ts for compatibility with TS 1.4 * Remove ts-compiler dependency and use the now-public TypeScript compiler API directly. Fixes immutable-js#399
There are some failing tests because of this change. What's the reason for that? |
The test comment indicated that one trailing hole was expected but the argument to toEqual() had two. This used to pass previously due to an emission bug in the TypeScript 1.0 compiler which is fixed in TS 1.4
@@ -31,7 +31,7 @@ describe('slice', () => { | |||
it('slices a sparse indexed sequence', () => { | |||
expect(Seq([1,,2,,3,,4,,5,,6]).slice(1).toArray()).toEqual([,2,,3,,4,,5,,6]); | |||
expect(Seq([1,,2,,3,,4,,5,,6]).slice(2).toArray()).toEqual([2,,3,,4,,5,,6]); | |||
expect(Seq([1,,2,,3,,4,,5,,6]).slice(3, -3).toArray()).toEqual([,3,,4,,,]); // one trailing hole. | |||
expect(Seq([1,,2,,3,,4,,5,,6]).slice(3, -3).toArray()).toEqual([,3,,4,,]); // one trailing hole. |
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 guess TypeScript changed their rules around trailing comma removal in 1.4?
Speed up TypeScript compilation when running test suite
Nice work! |
Looks to me like it was simply a bug that got fixed. Thanks for the quick review! |
I'm having trouble getting started with contribution to the project. My first time trying to run tests failed. I tried with the tag prior to this change and all was fine. I just filed an issue for it #431 |
Speed up the test suite by updating to the current version
of the TypeScript compiler which is ~5x faster than the 1.0
version that was being used previously and caching compiled
TypeScript files.
with TS 1.4
compiler API directly.
Fixes #399
With these changes a full run of the test suite on my laptop goes from ~100s to ~20s on first run and ~10s for subsequent runs where the test files have not changed.
There is currently a test failure in slice.ts which I'm looking into