Skip to content
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

Why debounce cancel test failed? #5446

Closed
zhaozhiming opened this issue Nov 19, 2015 · 2 comments
Closed

Why debounce cancel test failed? #5446

zhaozhiming opened this issue Nov 19, 2015 · 2 comments

Comments

@zhaozhiming
Copy link

Hi all,
I run the grunt test:browser test, only 1 test failed, it's the src/ui/public/debounce/__tests__/debounce.js:

describe('cancel', function () {
    it('should cancel the $timeout', function () {
      var cancelSpy = sinon.spy($timeout, 'cancel');
      var bouncer = debounce(spy, 100);
      bouncer();
      bouncer.cancel();
      expect(cancelSpy.callCount).to.be(1);
      $timeout.verifyNoPendingTasks(); // throws if pending timeouts
    });
});

This is the test result:

Chrome 46.0.2490 (Mac OS X 10.10.5): Executed Chrome 46.0.2490 (Mac OS X 10.10.5) debounce service cancel should cancel the $timeout FAILED
        Error: Deferred tasks to flush (1): {id: 0, time: 0}
            at Function.$delegate.verifyNoPendingTasks (http://localhost:5610/bundles/tests.bundle.js:190735:14)
            at Context.<anonymous> (http://localhost:5610/bundles/tests.bundle.js:272475:17)
Chrome 46.0.2490 (Mac OS X 10.10.5): Executed Chrome 46.0.2490 (Mac OS X 10.10.5): Executed 1 of 1 (1 FAILED) ERROR (0.174 secs / 0.012 secs)

Could someone help me? Thanks.

@rashidkpc
Copy link
Contributor

I'm not seeing this test failure

@rashidkpc
Copy link
Contributor

Closing for lack of feedback

srl295 added a commit to srl295/kibana that referenced this issue May 20, 2016
* Otherwise, the '$http GET' to fetch translation resources
shows up as a deferred task here.

* May have fixed elastic#5446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants