{"action":"closed","issue":{"url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1312","repository_url":"https://api.github.com/repos/redux-saga/redux-saga","labels_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1312/labels{/name}","comments_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1312/comments","events_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1312/events","html_url":"https://github.com/redux-saga/redux-saga/issues/1312","id":289994220,"node_id":"MDU6SXNzdWUyODk5OTQyMjA=","number":1312,"title":"Any way to wait for sagas in high level integration tests?","user":{"login":"nathanmarks","id":4420103,"node_id":"MDQ6VXNlcjQ0MjAxMDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4420103?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanmarks","html_url":"https://github.com/nathanmarks","followers_url":"https://api.github.com/users/nathanmarks/followers","following_url":"https://api.github.com/users/nathanmarks/following{/other_user}","gists_url":"https://api.github.com/users/nathanmarks/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanmarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanmarks/subscriptions","organizations_url":"https://api.github.com/users/nathanmarks/orgs","repos_url":"https://api.github.com/users/nathanmarks/repos","events_url":"https://api.github.com/users/nathanmarks/events{/privacy}","received_events_url":"https://api.github.com/users/nathanmarks/received_events","type":"User","site_admin":false},"labels":[{"id":293021649,"node_id":"MDU6TGFiZWwyOTMwMjE2NDk=","url":"https://api.github.com/repos/redux-saga/redux-saga/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-01-19T14:32:53Z","updated_at":"2018-09-03T21:54:42Z","closed_at":"2018-09-03T21:54:42Z","author_association":"NONE","body":"I have some very high level integration tests in my application that I'm running using jest/node/jsdom and I'm mocking HTTP requests using nock.\r\n\r\nIs there any sort of equivalent test helper to something like:\r\n\r\n```\r\nexport const flushAsync = () => new Promise((resolve) => setTimeout(resolve, 0));\r\n```\r\n\r\nThat I can implement that would allow me to reliably wait until my sagas have finished running before making assertions in my tests?\r\n\r\n(note, the above does work for flushing promises in other cases, but with my setup, I found I had to increase the timeout higher than ~5ms to wait for my sagas to be completed).\r\n\r\nI did look at https://github.com/redux-saga/redux-saga/issues/187 but it didn't help me achieve what I'm trying to do."}}
{"actor":{"display_login":"Andarist"}}