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

When not working in Jasmine tests #491

Closed
anho opened this issue Jun 28, 2016 · 0 comments
Closed

When not working in Jasmine tests #491

anho opened this issue Jun 28, 2016 · 0 comments

Comments

@anho
Copy link

anho commented Jun 28, 2016

Hi everyone,

I'm not sure what is causing my issue, if its when or maybe Jasmine. But here is my problem (there is this repo for it). When trying to resolve a promise in a test its not working in a more or less specific use case, if I do the same w/o Jasmine its working totally fine.

So here is what it does:

var when = require('when');
var agg = require('./aggregate');

var a = agg(() => {
    return when.promise((resolve) => {
        resolve();
    });
});

a().done(() => {
  console.log('where are done, yeah');
});

The handler inside agg(...) will be called only every x times, for the test its actually every single call. If this handler is resolved, the handler attached to the promise of the a() call should be fired. But unfortunately its only working outside the scope of a test. For testing purpose the docker compose can be used by running docker-compose run test-6 or docker-compose run working-6

Did someone have similar issues and already resolved them?

Best
Andreas

@anho anho closed this as completed Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant