Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Integrate WTF into zone.js#210

Closed
mhevery wants to merge 6 commits intoangular:masterfrom
mhevery:wtf
Closed

Integrate WTF into zone.js#210
mhevery wants to merge 6 commits intoangular:masterfrom
mhevery:wtf

Conversation

@mhevery
Copy link
Copy Markdown
Contributor

@mhevery mhevery commented Nov 25, 2015

Comment thread .gitignore
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.

-1 you should add it to your own global gitignore

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.

nah.. this line is to protect us from Misko not to protect Misko from our commits.

I'm fine with keeping it in.

@mhevery mhevery force-pushed the wtf branch 4 times, most recently from 6da186b to 9b91fd7 Compare November 27, 2015 00:07
@mhevery
Copy link
Copy Markdown
Contributor Author

mhevery commented Nov 27, 2015

I have updated all with your comments. It fails on IE9, but I don't know how to get it reproduced locally. Could anyone help.

@mhevery
Copy link
Copy Markdown
Contributor Author

mhevery commented Nov 27, 2015

I found the reason why IE9 was failing. We are all green.

@mhevery mhevery force-pushed the wtf branch 4 times, most recently from f75bf06 to 21f4099 Compare December 1, 2015 05:22
Comment thread lib/patch/functions.js Outdated
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.

the caller should pass the info

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

The tests run slow, because afterEach was async but never called done().
because it was afterEach any errors are ignored and so it did not show
up as failure. Instead the test ran very slow until jasmine timed out.

This fix corrects the afterEach and decreases the timeout to 1,000 ms.
When you have in async test (test with `done` argument) jasmine will 
execute the next test synchronously in the done handle. This makes sense
for most tests, but now with zones. With zones running next test 
synchronously means that the current zone does not get cleared. This 
results in a chain of nested zones, which makes it hard to reason about 
it. We override the `clearStack` method which forces jasmine to always 
drain the stack before next test gets executed.
This rewrites the (set/clear)Timeout/Interval/Immediate method to render
information in WTF. It also makes the code more explicit, by removing
the need for bind method and instead creating explicit callbacks. The
resulting code is faster, and easier to read and reason about.
setTimeout/clearTimeout and requeustAnimationFrame/cancelAnimationFrame
have same semantics, so now they share the same code path.
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.

3 participants