-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Debounce spy #50
Debounce spy #50
Conversation
While some of the tests are still running, the Ubuntu Tests are looking great Editor: 24 Failed Tests |
I would put the mocked debounce function in its own file. Also, we should add some comments to the code about why it was needed and how we could remove it in the future. |
Totally fair point, I'll go ahead and prettify this a bit more when home from work. |
@fabianfiorotto I've implemented the changes you suggested, what do you think? |
@confused-Techie it looks great |
@confused-Techie, with this change, we can rollback any other change made to |
This commit was made originally to avoid timing while testing. But as thats now fixed this can be restored to original functionality.
Great catch. I've reverted those changes on this branch. |
LGTM 👍 |
Rad, so with approval, and having had a few eyes looking at this, and the tests looking great I'll go ahead and merge. Thanks to everyone here that's contributed! |
This debounce spyOn uses a decaffeinated
spec/spec-helper.js
to mock the implementation ofdebounce
inunderscore
.This is because on the older version of
underscore
we are using, it relies onDate().getTime()
instead ofDate.now()
which is what we are mocking.And thanks to @fabianfiorotto for determining this as the best solution for the problem.
With this change, it allows all tests in
spec/atom-environment-spec.js
andspec/config-spec.js
to pass successfully. But it is important to note, that once we getunderscore
updated onpulsar-edit/underscore-plus
this mock implementation likely will not be needed.This PR requires PR #45 to be merged, since it contains the majority of decaffeination work done.