{"action":"created","issue":{"url":"https://api.github.com/repos/scalatest/scalatest/issues/1039","repository_url":"https://api.github.com/repos/scalatest/scalatest","labels_url":"https://api.github.com/repos/scalatest/scalatest/issues/1039/labels{/name}","comments_url":"https://api.github.com/repos/scalatest/scalatest/issues/1039/comments","events_url":"https://api.github.com/repos/scalatest/scalatest/issues/1039/events","html_url":"https://github.com/scalatest/scalatest/issues/1039","id":194874516,"number":1039,"title":"Asynchronous Tests in Scala.js with Futures based on Promises","user":{"login":"darkfrog26","id":877534,"avatar_url":"https://avatars.githubusercontent.com/u/877534?v=3","gravatar_id":"","url":"https://api.github.com/users/darkfrog26","html_url":"https://github.com/darkfrog26","followers_url":"https://api.github.com/users/darkfrog26/followers","following_url":"https://api.github.com/users/darkfrog26/following{/other_user}","gists_url":"https://api.github.com/users/darkfrog26/gists{/gist_id}","starred_url":"https://api.github.com/users/darkfrog26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkfrog26/subscriptions","organizations_url":"https://api.github.com/users/darkfrog26/orgs","repos_url":"https://api.github.com/users/darkfrog26/repos","events_url":"https://api.github.com/users/darkfrog26/events{/privacy}","received_events_url":"https://api.github.com/users/darkfrog26/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-12T01:46:42Z","updated_at":"2016-12-27T20:14:39Z","closed_at":null,"body":"I'm attempting to use `AsyncWordSpec` and in Scala it works fine, but when I attempt to run the same tests in Scala.js I get the following exception:\r\n\r\n`java.lang.IllegalStateException: Queue is empty while future is not completed, this means you're probably using a wrong ExecutionContext for your task, please double check your Future.`\r\n\r\nI believe this is due to the fact the `Future` being referenced is derived from a `Promise` and is being fulfilled via JavaScript's `setTimeout`, so there is nothing enqueued to an `ExecutionContext`.  Is there any way to get this test to work properly on Scala.js?"},"comment":{"url":"https://api.github.com/repos/scalatest/scalatest/issues/comments/269376908","html_url":"https://github.com/scalatest/scalatest/issues/1039#issuecomment-269376908","issue_url":"https://api.github.com/repos/scalatest/scalatest/issues/1039","id":269376908,"user":{"login":"darkfrog26","id":877534,"avatar_url":"https://avatars.githubusercontent.com/u/877534?v=3","gravatar_id":"","url":"https://api.github.com/users/darkfrog26","html_url":"https://github.com/darkfrog26","followers_url":"https://api.github.com/users/darkfrog26/followers","following_url":"https://api.github.com/users/darkfrog26/following{/other_user}","gists_url":"https://api.github.com/users/darkfrog26/gists{/gist_id}","starred_url":"https://api.github.com/users/darkfrog26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkfrog26/subscriptions","organizations_url":"https://api.github.com/users/darkfrog26/orgs","repos_url":"https://api.github.com/users/darkfrog26/repos","events_url":"https://api.github.com/users/darkfrog26/events{/privacy}","received_events_url":"https://api.github.com/users/darkfrog26/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T20:14:39Z","updated_at":"2016-12-27T20:14:39Z","body":"I'm still seeing this problem. It's easily reproducible by simply creating a `Promise` and then returning the `Future` derived from it.  I use this for my Scala.js tests that do callbacks to try to fulfill the promise but since there's not `ExecutionContext` for a `Promise` the queue is empty."}}
{"actor":{"display_login":"darkfrog26"}}